diff options
author | ZJ van de Weg <zegerjan@gitlab.com> | 2016-05-25 15:43:07 +0200 |
---|---|---|
committer | ZJ van de Weg <zegerjan@gitlab.com> | 2016-05-25 15:43:07 +0200 |
commit | 6523002267e63e301693c141f6de2c6bbf6e2e73 (patch) | |
tree | 6748089e49beca4e882a34eef3d8779bee33edaf /features | |
parent | 9777a3d39de8c483ab1a3a6dc325b0a7f32eff68 (diff) | |
download | gitlab-ce-6523002267e63e301693c141f6de2c6bbf6e2e73.tar.gz |
Remove old tests, and use right factories
Diffstat (limited to 'features')
-rw-r--r-- | features/steps/project/issues/issues.rb | 10 | ||||
-rw-r--r-- | features/steps/project/merge_requests.rb | 8 |
2 files changed, 9 insertions, 9 deletions
diff --git a/features/steps/project/issues/issues.rb b/features/steps/project/issues/issues.rb index 78ddaee8771..530ba604300 100644 --- a/features/steps/project/issues/issues.rb +++ b/features/steps/project/issues/issues.rb @@ -192,14 +192,14 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps step 'issue "Release 0.4" have 2 upvotes and 1 downvote' do awardable = Issue.find_by(title: 'Release 0.4') - create_list(:upvote, 2, project: project, awardable: awardable) - create(:downvote, project: project, awardable: awardable) + create_list(:award_emoji, 2, awardable: awardable) + create(:award_emoji, :downvote, awardable: awardable) end step 'issue "Tweet control" have 1 upvote and 2 downvotes' do - issue = Issue.find_by(title: 'Tweet control') - create(:upvote, project: project, noteable: issue) - create_list(:downvote, 2, project: project, noteable: issue) + awardable = Issue.find_by(title: 'Tweet control') + create(:award_emoji, :upvote, awardable: awardable) + create_list(:award_emoji, 2, awardable: awardable, name: 'thumbsdown') end step 'The list should be sorted by "Least popular"' do diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb index bdb126c6ede..692a01c7f74 100644 --- a/features/steps/project/merge_requests.rb +++ b/features/steps/project/merge_requests.rb @@ -179,14 +179,14 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps step 'merge request "Bug NS-04" have 2 upvotes and 1 downvote' do merge_request = MergeRequest.find_by(title: 'Bug NS-04') - create_list(:upvote, 2, project: project, awardable: merge_request) - create(:downvote, project: project, awardable: merge_request) + create_list(:award_emoji, 2, awardable: merge_request) + create(:award_emoji, :downvote, awardable: merge_request) end step 'merge request "Bug NS-06" have 1 upvote and 2 downvotes' do awardable = MergeRequest.find_by(title: 'Bug NS-06') - create(:upvote, project: project, awardable: awardable) - create_list(:downvote, 2, project: project, awardable: awardable) + create(:award_emoji, awardable: awardable) + create_list(:award_emoji, 2, awardable: awardable, name: "thumbsdown") end step 'The list should be sorted by "Least popular"' do |