diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-04-05 12:43:03 +0000 |
---|---|---|
committer | Jacob Schatz <jschatz@gitlab.com> | 2017-04-05 12:43:03 +0000 |
commit | 7c5198219aacaf18bfc7e8c523dcfa15d013139a (patch) | |
tree | 275c5f2cedbd6eccc98c66feb59e310c903b9cb1 /spec/features/dashboard | |
parent | a40e357f27ddcefa9ef70be84c7e7ee0f3b15e02 (diff) | |
download | gitlab-ce-7c5198219aacaf18bfc7e8c523dcfa15d013139a.tar.gz |
MR empty state
Diffstat (limited to 'spec/features/dashboard')
-rw-r--r-- | spec/features/dashboard/merge_requests_spec.rb | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/spec/features/dashboard/merge_requests_spec.rb b/spec/features/dashboard/merge_requests_spec.rb new file mode 100644 index 00000000000..508ca38d7e5 --- /dev/null +++ b/spec/features/dashboard/merge_requests_spec.rb @@ -0,0 +1,32 @@ +require 'spec_helper' + +describe 'Dashboard Merge Requests' do + let(:current_user) { create :user } + let(:project) do + create(:empty_project) do |project| + project.add_master(current_user) + end + end + + before do + login_as(current_user) + end + + it 'should show an empty state' do + visit merge_requests_dashboard_path(assignee_id: current_user.id) + + expect(page).to have_selector('.empty-state') + end + + context 'if there are merge requests' do + before do + create(:merge_request, assignee: current_user, source_project: project) + + visit merge_requests_dashboard_path(assignee_id: current_user.id) + end + + it 'should not show an empty state' do + expect(page).not_to have_selector('.empty-state') + end + end +end |