summaryrefslogtreecommitdiff
path: root/spec/features
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2017-04-07 17:19:21 +0000
committerKamil Trzciński <ayufan@ayufan.eu>2017-04-07 17:19:21 +0000
commit8631779b1a012bdb5bd9d8de18d6faff49a5821b (patch)
tree8fd4574204819265368009d4553c82d4b0a7215a /spec/features
parent46aadc5c16150446840a26ea7199380830369326 (diff)
parent9eded57dd2b4d23e43b485c448abb92359e6933e (diff)
downloadgitlab-ce-8631779b1a012bdb5bd9d8de18d6faff49a5821b.tar.gz
Merge branch 'bvl-fix-project-ci-status-cache' into 'master'
Fix invalidating Project build status cache to often See merge request !10313
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/dashboard/projects_spec.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/spec/features/dashboard/projects_spec.rb b/spec/features/dashboard/projects_spec.rb
index c4e58d14f75..f1789fc9d43 100644
--- a/spec/features/dashboard/projects_spec.rb
+++ b/spec/features/dashboard/projects_spec.rb
@@ -7,7 +7,6 @@ RSpec.describe 'Dashboard Projects', feature: true do
before do
project.team << [user, :developer]
login_as user
- visit dashboard_projects_path
end
it 'shows the project the user in a member of in the list' do
@@ -15,15 +14,19 @@ RSpec.describe 'Dashboard Projects', feature: true do
expect(page).to have_content('awesome stuff')
end
- describe "with a pipeline" do
- let(:pipeline) { create(:ci_pipeline, :success, 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
- pipeline
+ # Since the cache isn't updated when a new pipeline is created
+ # we need the pipeline to advance in the pipeline since the cache was created
+ # by visiting the login page.
+ pipeline.succeed
end
it 'shows that the last pipeline passed' do
visit dashboard_projects_path
+
expect(page).to have_xpath("//a[@href='#{pipelines_namespace_project_commit_path(project.namespace, project, project.commit)}']")
end
end