From 91a7b9333b660abc866e52e1a614151cb529413d Mon Sep 17 00:00:00 2001 From: "Z.J. van de Weg" Date: Wed, 1 Jun 2016 11:23:09 +0200 Subject: Incorportate feedback --- spec/models/award_emoji_spec.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'spec/models/award_emoji_spec.rb') diff --git a/spec/models/award_emoji_spec.rb b/spec/models/award_emoji_spec.rb index fd3712b7d43..cb3c592f8cd 100644 --- a/spec/models/award_emoji_spec.rb +++ b/spec/models/award_emoji_spec.rb @@ -14,7 +14,6 @@ describe AwardEmoji, models: true do it { is_expected.to validate_presence_of(:awardable) } it { is_expected.to validate_presence_of(:user) } it { is_expected.to validate_presence_of(:name) } - it { is_expected.to validate_presence_of(:awardable) } # To circumvent a bug in the shoulda matchers describe "scoped uniqueness validation" do @@ -22,7 +21,7 @@ describe AwardEmoji, models: true do user = create(:user) issue = create(:issue) create(:award_emoji, user: user, awardable: issue) - new_award = AwardEmoji.new(user: user, awardable: issue, name: "thumbsup") + new_award = build(:award_emoji, user: user, awardable: issue) expect(new_award).not_to be_valid end -- cgit v1.2.1