2017-01-23 15:40:25 -05:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe DashboardController do
|
2018-11-28 14:06:02 -05:00
|
|
|
context 'signed in' do
|
|
|
|
let(:user) { create(:user) }
|
|
|
|
let(:project) { create(:project) }
|
2017-01-23 15:40:25 -05:00
|
|
|
|
2018-11-28 14:06:02 -05:00
|
|
|
before do
|
|
|
|
project.add_maintainer(user)
|
|
|
|
sign_in(user)
|
|
|
|
end
|
2017-01-23 15:40:25 -05:00
|
|
|
|
2018-11-28 14:06:02 -05:00
|
|
|
describe 'GET issues' do
|
|
|
|
it_behaves_like 'issuables list meta-data', :issue, :issues
|
|
|
|
it_behaves_like 'issuables requiring filter', :issues
|
|
|
|
end
|
2017-01-23 15:40:25 -05:00
|
|
|
|
2018-11-28 14:06:02 -05:00
|
|
|
describe 'GET merge requests' do
|
|
|
|
it_behaves_like 'issuables list meta-data', :merge_request, :merge_requests
|
|
|
|
it_behaves_like 'issuables requiring filter', :merge_requests
|
|
|
|
end
|
2017-01-23 15:40:25 -05:00
|
|
|
end
|
2018-11-28 14:06:02 -05:00
|
|
|
|
|
|
|
it_behaves_like 'authenticates sessionless user', :issues, :atom, author_id: User.first
|
|
|
|
it_behaves_like 'authenticates sessionless user', :issues_calendar, :ics
|
2017-01-23 15:40:25 -05:00
|
|
|
end
|