diff options
author | Stan Hu <stanhu@gmail.com> | 2019-02-15 17:59:58 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-02-15 17:59:58 +0300 |
commit | bd488bc29afbfdfeca5c22ab2caa926525dd666b (patch) | |
tree | 3cc5f8365bf59d947eef5a9cd7fce58424a9b5ba /spec/controllers | |
parent | c34c50e1b88dfd7a4a453437b40a12708428a74f (diff) | |
parent | 0f0bf2a2cb5d6d5de94585c242bdc1378eb75bbc (diff) |
Merge branch '56332-exclude-public-group-milestones-from-count' into 'master'
Exclude public group milestones from counts in milestones dashboard
Closes #56332
See merge request gitlab-org/gitlab-ce!25230
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/dashboard/milestones_controller_spec.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/spec/controllers/dashboard/milestones_controller_spec.rb b/spec/controllers/dashboard/milestones_controller_spec.rb index 8b176e07bc8..4b164d0aa6b 100644 --- a/spec/controllers/dashboard/milestones_controller_spec.rb +++ b/spec/controllers/dashboard/milestones_controller_spec.rb @@ -3,11 +3,9 @@ require 'spec_helper' describe Dashboard::MilestonesController do let(:project) { create(:project) } let(:group) { create(:group) } - let(:public_group) { create(:group, :public) } let(:user) { create(:user) } let(:project_milestone) { create(:milestone, project: project) } let(:group_milestone) { create(:milestone, group: group) } - let!(:public_milestone) { create(:milestone, group: public_group) } let(:milestone) do DashboardMilestone.build( [project], @@ -45,6 +43,9 @@ describe Dashboard::MilestonesController do end describe "#index" do + let(:public_group) { create(:group, :public) } + let!(:public_milestone) { create(:milestone, group: public_group) } + render_views it 'returns group and project milestones to which the user belongs' do @@ -74,10 +75,10 @@ describe Dashboard::MilestonesController do expect(response.body).not_to include(project_milestone.title) end - it 'should contain group and project milestones to which the user belongs to' do + it 'should show counts of group and project milestones to which the user belongs to' do get :index - expect(response.body).to include("Open\n<span class=\"badge badge-pill\">3</span>") + expect(response.body).to include("Open\n<span class=\"badge badge-pill\">2</span>") expect(response.body).to include("Closed\n<span class=\"badge badge-pill\">0</span>") end end |