summaryrefslogtreecommitdiff
path: root/spec/features/dashboard
diff options
context:
space:
mode:
authorAlexander Randa <randa.alex@gmail.com>2017-06-29 13:30:33 +0300
committerAlexander Randa <randa.alex@gmail.com>2017-06-29 16:56:36 +0300
commitaf89b19d69c043b2e9d40ef260adf97e00d1f791 (patch)
tree1e374a6456f05f254150983c8d89f1023474ada8 /spec/features/dashboard
parenta8bc8d4d39c7934e3440966797d90c6c8be7887c (diff)
downloadgitlab-ce-af89b19d69c043b2e9d40ef260adf97e00d1f791.tar.gz
Replaces 'dashboard/new-project.feature' spinach with rspec
Diffstat (limited to 'spec/features/dashboard')
-rw-r--r--spec/features/dashboard/projects_spec.rb16
1 files changed, 12 insertions, 4 deletions
diff --git a/spec/features/dashboard/projects_spec.rb b/spec/features/dashboard/projects_spec.rb
index f29186f368d..e9ef5d7983a 100644
--- a/spec/features/dashboard/projects_spec.rb
+++ b/spec/features/dashboard/projects_spec.rb
@@ -1,8 +1,8 @@
require 'spec_helper'
-RSpec.describe 'Dashboard Projects', feature: true do
+feature 'Dashboard Projects' do
let(:user) { create(:user) }
- let(:project) { create(:project, name: "awesome stuff") }
+ let(:project) { create(:project, name: 'awesome stuff') }
let(:project2) { create(:project, :public, name: 'Community project') }
before do
@@ -15,6 +15,14 @@ RSpec.describe 'Dashboard Projects', feature: true do
expect(page).to have_content('awesome stuff')
end
+ it 'shows "New project" button' do
+ visit dashboard_projects_path
+
+ page.within '#content-body' do
+ expect(page).to have_link('New project')
+ end
+ end
+
context 'when last_repository_updated_at, last_activity_at and update_at are present' do
it 'shows the last_repository_updated_at attribute as the update date' do
project.update_attributes!(last_repository_updated_at: Time.now, last_activity_at: 1.hour.ago)
@@ -47,8 +55,8 @@ RSpec.describe 'Dashboard Projects', feature: true do
end
end
- describe "with a pipeline", redis: true do
- let!(:pipeline) { create(:ci_pipeline, project: project, sha: project.commit.sha) }
+ describe 'with a pipeline', redis: true do
+ let(:pipeline) { create(:ci_pipeline, project: project, sha: project.commit.sha) }
before do
# Since the cache isn't updated when a new pipeline is created