diff options
author | Eagllus <rvanzon@gitlab.com> | 2018-10-03 15:19:13 +0200 |
---|---|---|
committer | Eagllus <rvanzon@gitlab.com> | 2018-10-04 08:54:30 +0200 |
commit | 43f32c6bf966a85d6d5e1d8933a1cea67ec89ba4 (patch) | |
tree | 9e0c5487a680e499b29361ff263168883f6eec91 | |
parent | 3cd511733b5b646becfdf72e36062b863dfbcf20 (diff) | |
download | gitlab-ce-43f32c6bf966a85d6d5e1d8933a1cea67ec89ba4.tar.gz |
Add test for the milestone count
-rw-r--r-- | spec/controllers/dashboard/milestones_controller_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/controllers/dashboard/milestones_controller_spec.rb b/spec/controllers/dashboard/milestones_controller_spec.rb index 56047c0c8d2..278b980b6d8 100644 --- a/spec/controllers/dashboard/milestones_controller_spec.rb +++ b/spec/controllers/dashboard/milestones_controller_spec.rb @@ -45,6 +45,8 @@ describe Dashboard::MilestonesController do end describe "#index" do + render_views + it 'returns group and project milestones to which the user belongs' do get :index, format: :json @@ -53,5 +55,12 @@ describe Dashboard::MilestonesController do expect(json_response.map { |i| i["first_milestone"]["id"] }).to match_array([group_milestone.id, project_milestone.id]) expect(json_response.map { |i| i["group_name"] }.compact).to match_array(group.name) end + + it 'should contain 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("Closed\n<span class=\"badge badge-pill\">0</span>") + end end end |