diff options
author | Vinnie Okada <vokada@mrvinn.com> | 2015-01-24 11:02:58 -0700 |
---|---|---|
committer | Vinnie Okada <vokada@mrvinn.com> | 2015-02-14 11:09:23 -0700 |
commit | 76aad9b76ed756ca9ba2cbcdb399c815e542b3ae (patch) | |
tree | 7226e0ce64796abbf4848582baed8d173ddecd14 /spec/features/issues_spec.rb | |
parent | 5725b6daad2f403f13112cfcafa5b45ac126c0ca (diff) | |
download | gitlab-ce-76aad9b76ed756ca9ba2cbcdb399c815e542b3ae.tar.gz |
Upgrade to Rails 4.1.9
Make the following changes to deal with new behavior in Rails 4.1.2:
* Use nested resources to avoid slashes in arguments to path helpers.
Diffstat (limited to 'spec/features/issues_spec.rb')
-rw-r--r-- | spec/features/issues_spec.rb | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/spec/features/issues_spec.rb b/spec/features/issues_spec.rb index f54155439cb..a2db57ad908 100644 --- a/spec/features/issues_spec.rb +++ b/spec/features/issues_spec.rb @@ -21,7 +21,7 @@ describe 'Issues', feature: true do end before do - visit project_issues_path(project) + visit namespace_project_issues_path(project.namespace, project) click_link "Edit" end @@ -61,7 +61,7 @@ describe 'Issues', feature: true do end it 'allows user to select unasigned', js: true do - visit edit_project_issue_path(project, issue) + visit edit_namespace_project_issue_path(project.namespace, project, issue) expect(page).to have_content "Assign to #{@user.name}" @@ -95,7 +95,7 @@ describe 'Issues', feature: true do let(:issue) { @issue } it 'should allow filtering by issues with no specified milestone' do - visit project_issues_path(project, milestone_id: '0') + visit namespace_project_issues_path(project.namespace, project, milestone_id: '0') expect(page).not_to have_content 'foobar' expect(page).to have_content 'barbaz' @@ -103,7 +103,7 @@ describe 'Issues', feature: true do end it 'should allow filtering by a specified milestone' do - visit project_issues_path(project, milestone_id: issue.milestone.id) + visit namespace_project_issues_path(project.namespace, project, milestone_id: issue.milestone.id) expect(page).to have_content 'foobar' expect(page).not_to have_content 'barbaz' @@ -111,7 +111,7 @@ describe 'Issues', feature: true do end it 'should allow filtering by issues with no specified assignee' do - visit project_issues_path(project, assignee_id: '0') + visit namespace_project_issues_path(project.namespace, project, assignee_id: '0') expect(page).to have_content 'foobar' expect(page).not_to have_content 'barbaz' @@ -119,7 +119,7 @@ describe 'Issues', feature: true do end it 'should allow filtering by a specified assignee' do - visit project_issues_path(project, assignee_id: @user.id) + visit namespace_project_issues_path(project.namespace, project, assignee_id: @user.id) expect(page).not_to have_content 'foobar' expect(page).to have_content 'barbaz' @@ -140,14 +140,14 @@ describe 'Issues', feature: true do let(:later_due_milestone) { create(:milestone, due_date: '2013-12-12') } it 'sorts by newest' do - visit project_issues_path(project, sort: sort_value_recently_created) + visit namespace_project_issues_path(project.namespace, project, sort: sort_value_recently_created) expect(first_issue).to include('foo') expect(last_issue).to include('baz') end it 'sorts by oldest' do - visit project_issues_path(project, sort: sort_value_oldest_created) + visit namespace_project_issues_path(project.namespace, project, sort: sort_value_oldest_created) expect(first_issue).to include('baz') expect(last_issue).to include('foo') @@ -156,7 +156,7 @@ describe 'Issues', feature: true do it 'sorts by most recently updated' do baz.updated_at = Time.now + 100 baz.save - visit project_issues_path(project, sort: sort_value_recently_updated) + visit namespace_project_issues_path(project.namespace, project, sort: sort_value_recently_updated) expect(first_issue).to include('baz') end @@ -164,7 +164,7 @@ describe 'Issues', feature: true do it 'sorts by least recently updated' do baz.updated_at = Time.now - 100 baz.save - visit project_issues_path(project, sort: sort_value_oldest_updated) + visit namespace_project_issues_path(project.namespace, project, sort: sort_value_oldest_updated) expect(first_issue).to include('baz') end @@ -178,13 +178,13 @@ describe 'Issues', feature: true do end it 'sorts by recently due milestone' do - visit project_issues_path(project, sort: sort_value_milestone_soon) + visit namespace_project_issues_path(project.namespace, project, sort: sort_value_milestone_soon) expect(first_issue).to include('foo') end it 'sorts by least recently due milestone' do - visit project_issues_path(project, sort: sort_value_milestone_later) + visit namespace_project_issues_path(project.namespace, project, sort: sort_value_milestone_later) expect(first_issue).to include('bar') end @@ -201,9 +201,9 @@ describe 'Issues', feature: true do end it 'sorts with a filter applied' do - visit project_issues_path(project, - sort: sort_value_oldest_created, - assignee_id: user2.id) + visit namespace_project_issues_path(project.namespace, project, + sort: sort_value_oldest_created, + assignee_id: user2.id) expect(first_issue).to include('bar') expect(last_issue).to include('foo') @@ -218,7 +218,7 @@ describe 'Issues', feature: true do context 'by autorized user' do it 'with dropdown menu' do - visit project_issue_path(project, issue) + visit namespace_project_issue_path(project.namespace, project, issue) find('.edit-issue.inline-update #issue_assignee_id'). set project.team.members.first.id @@ -244,7 +244,7 @@ describe 'Issues', feature: true do logout login_with guest - visit project_issue_path(project, issue) + visit namespace_project_issue_path(project.namespace, project, issue) expect(page).to have_content issue.assignee.name end end @@ -257,7 +257,7 @@ describe 'Issues', feature: true do context 'by authorized user' do it 'with dropdown menu' do - visit project_issue_path(project, issue) + visit namespace_project_issue_path(project.namespace, project, issue) find('.edit-issue.inline-update'). select(milestone.title, from: 'issue_milestone_id') @@ -282,7 +282,7 @@ describe 'Issues', feature: true do logout login_with guest - visit project_issue_path(project, issue) + visit namespace_project_issue_path(project.namespace, project, issue) expect(page).to have_content milestone.title end end @@ -295,8 +295,8 @@ describe 'Issues', feature: true do issue.save end - it 'allows user to remove assignee', js: true do - visit project_issue_path(project, issue) + it 'allows user to remove assignee', :js => true do + visit namespace_project_issue_path(project.namespace, project, issue) expect(page).to have_content "Assignee: #{user2.name}" first('#s2id_issue_assignee_id').click |