diff options
Diffstat (limited to 'spec/controllers/dashboard')
6 files changed, 7 insertions, 30 deletions
diff --git a/spec/controllers/dashboard/groups_controller_spec.rb b/spec/controllers/dashboard/groups_controller_spec.rb index b615bcc1e6b..f246d7bcaf1 100644 --- a/spec/controllers/dashboard/groups_controller_spec.rb +++ b/spec/controllers/dashboard/groups_controller_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Dashboard::GroupsController do +RSpec.describe Dashboard::GroupsController do include ExternalAuthorizationServiceHelpers let(:user) { create(:user) } diff --git a/spec/controllers/dashboard/labels_controller_spec.rb b/spec/controllers/dashboard/labels_controller_spec.rb index cb9c3660b9b..415cb821545 100644 --- a/spec/controllers/dashboard/labels_controller_spec.rb +++ b/spec/controllers/dashboard/labels_controller_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Dashboard::LabelsController do +RSpec.describe Dashboard::LabelsController do let(:project) { create(:project) } let(:user) { create(:user) } let!(:label) { create(:label, project: project) } diff --git a/spec/controllers/dashboard/milestones_controller_spec.rb b/spec/controllers/dashboard/milestones_controller_spec.rb index f4b04ad6dee..899aa7a41c1 100644 --- a/spec/controllers/dashboard/milestones_controller_spec.rb +++ b/spec/controllers/dashboard/milestones_controller_spec.rb @@ -2,18 +2,13 @@ require 'spec_helper' -describe Dashboard::MilestonesController do +RSpec.describe Dashboard::MilestonesController do let(:project) { create(:project) } let(:group) { create(:group) } let(:user) { create(:user) } let(:project_milestone) { create(:milestone, project: project) } let(:group_milestone) { create(:milestone, group: group) } - let(:milestone) do - DashboardMilestone.build( - [project], - project_milestone.title - ) - end + let(:milestone) { create(:milestone, group: group) } let(:issue) { create(:issue, project: project, milestone: project_milestone) } let(:group_issue) { create(:issue, milestone: group_milestone, project: create(:project, group: group)) } @@ -28,22 +23,6 @@ describe Dashboard::MilestonesController do group.add_developer(user) end - it_behaves_like 'milestone tabs' - - describe "#show" do - render_views - - def view_milestone - get :show, params: { id: milestone.safe_title, title: milestone.title } - end - - it 'shows milestone page' do - view_milestone - - expect(response).to have_gitlab_http_status(:ok) - end - end - describe "#index" do let(:public_group) { create(:group, :public) } let!(:public_milestone) { create(:milestone, group: public_group) } @@ -58,7 +37,6 @@ describe Dashboard::MilestonesController do expect(response).to have_gitlab_http_status(:ok) expect(json_response.size).to eq(2) expect(json_response.map { |i| i["name"] }).to match_array([group_milestone.name, project_milestone.name]) - expect(json_response.map { |i| i["group_name"] }.compact).to match_array(group.name) end it 'returns closed group and project milestones to which the user belongs' do @@ -67,7 +45,6 @@ describe Dashboard::MilestonesController do expect(response).to have_gitlab_http_status(:ok) expect(json_response.size).to eq(2) expect(json_response.map { |i| i["name"] }).to match_array([closed_group_milestone.name, closed_project_milestone.name]) - expect(json_response.map { |i| i["group_name"] }.compact).to match_array(group.name) end it 'searches legacy project milestones by title when search_title is given' do diff --git a/spec/controllers/dashboard/projects_controller_spec.rb b/spec/controllers/dashboard/projects_controller_spec.rb index eeac696c3f2..ee043fde0ff 100644 --- a/spec/controllers/dashboard/projects_controller_spec.rb +++ b/spec/controllers/dashboard/projects_controller_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Dashboard::ProjectsController do +RSpec.describe Dashboard::ProjectsController do include ExternalAuthorizationServiceHelpers describe '#index' do diff --git a/spec/controllers/dashboard/snippets_controller_spec.rb b/spec/controllers/dashboard/snippets_controller_spec.rb index d5e3a348cd2..3c316d07408 100644 --- a/spec/controllers/dashboard/snippets_controller_spec.rb +++ b/spec/controllers/dashboard/snippets_controller_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Dashboard::SnippetsController do +RSpec.describe Dashboard::SnippetsController do let(:user) { create(:user) } before do diff --git a/spec/controllers/dashboard/todos_controller_spec.rb b/spec/controllers/dashboard/todos_controller_spec.rb index 004eef1873e..f0aa351bee0 100644 --- a/spec/controllers/dashboard/todos_controller_spec.rb +++ b/spec/controllers/dashboard/todos_controller_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Dashboard::TodosController do +RSpec.describe Dashboard::TodosController do let(:user) { create(:user) } let(:author) { create(:user) } let(:project) { create(:project) } |