summaryrefslogtreecommitdiff
path: root/spec/features/dashboard
diff options
context:
space:
mode:
authorLuke "Jared" Bennett <lbennett@gitlab.com>2017-04-05 12:43:03 +0000
committerJacob Schatz <jschatz@gitlab.com>2017-04-05 12:43:03 +0000
commit7c5198219aacaf18bfc7e8c523dcfa15d013139a (patch)
tree275c5f2cedbd6eccc98c66feb59e310c903b9cb1 /spec/features/dashboard
parenta40e357f27ddcefa9ef70be84c7e7ee0f3b15e02 (diff)
downloadgitlab-ce-7c5198219aacaf18bfc7e8c523dcfa15d013139a.tar.gz
MR empty state
Diffstat (limited to 'spec/features/dashboard')
-rw-r--r--spec/features/dashboard/merge_requests_spec.rb32
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