require'spec_helper'describeAwardEmoji,models: truedodescribe'Associations'doit{is_expected.tobelong_to(:awardable)}it{is_expected.tobelong_to(:user)}enddescribe'modules'doit{is_expected.toinclude_module(Participable)}enddescribe"validations"doit{is_expected.tovalidate_presence_of(:awardable)}it{is_expected.tovalidate_presence_of(:user)}it{is_expected.tovalidate_presence_of(:name)}# To circumvent a bug in the shoulda matchersdescribe"scoped uniqueness validation"doit"rejects duplicate award emoji"douser=create(:user)issue=create(:issue)create(:award_emoji,user: user,awardable: issue)