diff options
Diffstat (limited to 'spec/features/atom/issues_spec.rb')
-rw-r--r-- | spec/features/atom/issues_spec.rb | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/spec/features/atom/issues_spec.rb b/spec/features/atom/issues_spec.rb index a61231ea254..3eeb4d35131 100644 --- a/spec/features/atom/issues_spec.rb +++ b/spec/features/atom/issues_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'Issues Feed', feature: true do +describe 'Issues Feed' do describe 'GET /issues' do let!(:user) { create(:user, email: 'private1@example.com', public_email: 'public1@example.com') } let!(:assignee) { create(:user, email: 'private2@example.com', public_email: 'public2@example.com') } @@ -15,11 +15,11 @@ describe 'Issues Feed', feature: true do context 'when authenticated' do it 'renders atom feed' do - login_with user - visit namespace_project_issues_path(project.namespace, project, :atom) + sign_in user + visit project_issues_path(project, :atom) - expect(response_headers['Content-Type']). - to have_content('application/atom+xml') + expect(response_headers['Content-Type']) + .to have_content('application/atom+xml') expect(body).to have_selector('title', text: "#{project.name} issues") expect(body).to have_selector('author email', text: issue.author_public_email) expect(body).to have_selector('assignees assignee email', text: issue.assignees.first.public_email) @@ -30,11 +30,11 @@ describe 'Issues Feed', feature: true do context 'when authenticated via private token' do it 'renders atom feed' do - visit namespace_project_issues_path(project.namespace, project, :atom, + visit project_issues_path(project, :atom, private_token: user.private_token) - expect(response_headers['Content-Type']). - to have_content('application/atom+xml') + expect(response_headers['Content-Type']) + .to have_content('application/atom+xml') expect(body).to have_selector('title', text: "#{project.name} issues") expect(body).to have_selector('author email', text: issue.author_public_email) expect(body).to have_selector('assignees assignee email', text: issue.assignees.first.public_email) @@ -45,11 +45,11 @@ describe 'Issues Feed', feature: true do context 'when authenticated via RSS token' do it 'renders atom feed' do - visit namespace_project_issues_path(project.namespace, project, :atom, + visit project_issues_path(project, :atom, rss_token: user.rss_token) - expect(response_headers['Content-Type']). - to have_content('application/atom+xml') + expect(response_headers['Content-Type']) + .to have_content('application/atom+xml') expect(body).to have_selector('title', text: "#{project.name} issues") expect(body).to have_selector('author email', text: issue.author_public_email) expect(body).to have_selector('assignees assignee email', text: issue.assignees.first.public_email) @@ -59,7 +59,7 @@ describe 'Issues Feed', feature: true do end it "renders atom feed with url parameters for project issues" do - visit namespace_project_issues_path(project.namespace, project, + visit project_issues_path(project, :atom, rss_token: user.rss_token, state: 'opened', assignee_id: user.id) link = find('link[type="application/atom+xml"]') |