diff options
author | Bob Van Landuyt <bob@gitlab.com> | 2017-03-30 09:15:42 +0200 |
---|---|---|
committer | Bob Van Landuyt <bob@gitlab.com> | 2017-04-07 17:24:11 +0200 |
commit | 47abf00b24efb0f6263ea37eddf2d6587950c5ee (patch) | |
tree | 9159be8bffb2208834b23a0633a097fdb92f103c /spec/features | |
parent | 9082d1e046a8da394ea0b271f9f3fea909bb102c (diff) | |
download | gitlab-ce-47abf00b24efb0f6263ea37eddf2d6587950c5ee.tar.gz |
Update project build status cache when transitioning
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/dashboard/projects_spec.rb | 11 |
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 |