2017-02-28 15:50:57 -05:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2018-07-05 02:32:05 -04:00
|
|
|
describe 'Group activity page' do
|
2017-06-21 19:44:10 -04:00
|
|
|
let(:user) { create(:group_member, :developer, user: create(:user), group: group ).user }
|
2017-02-28 15:50:57 -05:00
|
|
|
let(:group) { create(:group) }
|
|
|
|
let(:path) { activity_group_path(group) }
|
|
|
|
|
|
|
|
context 'when signed in' do
|
|
|
|
before do
|
2017-06-21 19:44:10 -04:00
|
|
|
sign_in(user)
|
2017-02-28 15:50:57 -05:00
|
|
|
end
|
|
|
|
|
2018-03-17 04:29:05 -04:00
|
|
|
describe 'RSS' do
|
|
|
|
before do
|
|
|
|
visit path
|
|
|
|
end
|
|
|
|
|
2018-05-31 10:01:04 -04: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"
|
2018-03-17 04:29:05 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
context 'when project is in the group', :js do
|
|
|
|
let(:project) { create(:project, :public, namespace: group) }
|
|
|
|
|
|
|
|
before do
|
2018-07-11 10:36:08 -04:00
|
|
|
project.add_maintainer(user)
|
2018-03-17 04:29:05 -04:00
|
|
|
|
|
|
|
visit path
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'renders user joined to project event' do
|
|
|
|
expect(page).to have_content 'joined project'
|
|
|
|
end
|
|
|
|
end
|
2017-02-28 15:50:57 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
context 'when signed out' do
|
|
|
|
before do
|
|
|
|
visit path
|
|
|
|
end
|
|
|
|
|
2018-05-31 10:01:04 -04: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 15:50:57 -05:00
|
|
|
end
|
|
|
|
end
|