diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-07-08 15:49:37 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-07-08 15:49:37 -0400 |
commit | 098ad0a5b418b2414ab7c20b370d19a254109d19 (patch) | |
tree | e15a477da814cdfaf0be2c7893eeb0cc968c9280 /spec | |
parent | cf7c57aaf53036483da35868da84596dcdae2aaf (diff) | |
download | gitlab-ce-098ad0a5b418b2414ab7c20b370d19a254109d19.tar.gz |
Remove "mystery guest" from Milestone filtering features
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/issues/filter_by_milestone_spec.rb | 20 | ||||
-rw-r--r-- | spec/features/merge_requests/filter_by_milestone_spec.rb | 24 |
2 files changed, 18 insertions, 26 deletions
diff --git a/spec/features/issues/filter_by_milestone_spec.rb b/spec/features/issues/filter_by_milestone_spec.rb index 575ce23bb67..afefe9d9691 100644 --- a/spec/features/issues/filter_by_milestone_spec.rb +++ b/spec/features/issues/filter_by_milestone_spec.rb @@ -1,34 +1,30 @@ -require 'spec_helper' +require 'rails_helper' feature 'Issue filtering by Milestone', feature: true do include Select2Helper - let(:project) { create(:project) } - - before do - login_as(:admin) - end - - scenario 'User filters by Issues without a Milestone', js: true do + scenario 'filters by no Milestone', js: true do + project = create(:project, :public) create(:issue, project: project) - visit_issues + visit_issues(project) filter_by_milestone(Milestone::None.title) expect(page).to have_css('.issue-title', count: 1) end - scenario 'User filters by Issues with a specific Milestone', js: true do + scenario 'filters by a specific Milestone', js: true do + project = create(:project, :public) milestone = create(:milestone, project: project) create(:issue, project: project, milestone: milestone) - visit_issues + visit_issues(project) filter_by_milestone(milestone.title) expect(page).to have_css('.issue-title', count: 1) end - def visit_issues + def visit_issues(project) visit namespace_project_issues_path(project.namespace, project) end diff --git a/spec/features/merge_requests/filter_by_milestone_spec.rb b/spec/features/merge_requests/filter_by_milestone_spec.rb index 79b226bcd86..86b95e6cc29 100644 --- a/spec/features/merge_requests/filter_by_milestone_spec.rb +++ b/spec/features/merge_requests/filter_by_milestone_spec.rb @@ -1,34 +1,30 @@ -require 'spec_helper' +require 'rails_helper' feature 'Merge Request filtering by Milestone', feature: true do include Select2Helper - let(:project) { create(:project) } + scenario 'filters by no Milestone', js: true do + project = create(:project, :public) + create(:merge_request, :with_diffs, source_project: project) - before do - login_as(:admin) - end - - scenario 'User filters by Merge Requests without a Milestone', js: true do - create(:merge_request, :simple, source_project: project) - - visit_merge_requests + visit_merge_requests(project) filter_by_milestone(Milestone::None.title) expect(page).to have_css('.merge-request-title', count: 1) end - scenario 'User filters by Merge Requests with a specific Milestone', js: true do + scenario 'filters by a specific Milestone', js: true do + project = create(:project, :public) milestone = create(:milestone, project: project) - create(:merge_request, :simple, source_project: project, milestone: milestone) + create(:merge_request, :with_diffs, source_project: project, milestone: milestone) - visit_merge_requests + visit_merge_requests(project) filter_by_milestone(milestone.title) expect(page).to have_css('.merge-request-title', count: 1) end - def visit_merge_requests + def visit_merge_requests(project) visit namespace_project_merge_requests_path(project.namespace, project) end |