Skip to content
Snippets Groups Projects
Commit cc1d631e authored by Zeger-Jan van de Weg's avatar Zeger-Jan van de Weg
Browse files

Fix specs again

parent 7810d5c8
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -192,14 +192,14 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
 
step 'issue "Release 0.4" have 2 upvotes and 1 downvote' do
issue = Issue.find_by(title: 'Release 0.4')
create_list(:award_emoji, :upvote, 2, awardable: issue)
create_list(:award_emoji, 2, awardable: issue, name: "thumbsup")
create(:award_emoji, :downvote, awardable: issue)
end
 
step 'issue "Tweet control" have 1 upvote and 2 downvotes' do
issue = Issue.find_by(title: 'Tweet control')
create(:award_emoji, :upvote, awardable: issue)
create_list(:award_emoji, :downvote, 2, awardable: issue)
create_list(:award_emoji, 2, awardable: issue, name: "thumbsdown")
end
 
step 'The list should be sorted by "Least popular"' do
Loading
Loading
Loading
Loading
@@ -129,7 +129,11 @@ describe Issues::MoveService, services: true do
end
 
it 'moves the award emoji too' do
expect(new_issue.award_emoji).to eq(old_issue.award_emoji)
new_issue.reload
first_emoji = new_issue.award_emoji.first
expect(new_issue.award_emoji.count).to eq(old_issue.award_emoji.count)
expect(first_emoji.name).to eq(old_issue.award_emoji.first.name)
end
end
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment