Commit 43f32c6b authored by Eagllus's avatar Eagllus

Add test for the milestone count

parent 3cd51173
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment