2017-02-28 20:50:57 +00:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2018-07-05 06:32:05 +00:00
|
|
|
describe 'Project Issues RSS' do
|
2017-08-02 19:55:11 +00:00
|
|
|
let(:project) { create(:project, visibility_level: Gitlab::VisibilityLevel::PUBLIC) }
|
2017-07-06 16:20:50 +00:00
|
|
|
let(:path) { project_issues_path(project) }
|
2017-02-28 20:50:57 +00:00
|
|
|
|
|
|
|
before do
|
|
|
|
create(:issue, project: project)
|
|
|
|
end
|
|
|
|
|
|
|
|
context 'when signed in' do
|
2017-06-21 23:44:10 +00:00
|
|
|
let(:user) { create(:user) }
|
|
|
|
|
2017-02-28 20:50:57 +00:00
|
|
|
before do
|
2017-12-22 08:18:28 +00:00
|
|
|
project.add_developer(user)
|
2017-06-21 23:44:10 +00:00
|
|
|
sign_in(user)
|
2017-02-28 20:50:57 +00:00
|
|
|
visit path
|
|
|
|
end
|
|
|
|
|
2018-05-31 14:01:04 +00:00
|
|
|
it_behaves_like "it has an RSS button with current_user's feed token"
|
|
|
|
it_behaves_like "an autodiscoverable RSS feed with current_user's feed token"
|
2017-02-28 20:50:57 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
context 'when signed out' do
|
|
|
|
before do
|
|
|
|
visit path
|
|
|
|
end
|
|
|
|
|
2018-05-31 14:01:04 +00:00
|
|
|
it_behaves_like "it has an RSS button without a feed token"
|
|
|
|
it_behaves_like "an autodiscoverable RSS feed without a feed token"
|
2017-02-28 20:50:57 +00:00
|
|
|
end
|
|
|
|
end
|