From ff76adb5476f663fe92cec0ec4a78e93c7615191 Mon Sep 17 00:00:00 2001 From: Jacopo Date: Fri, 21 Apr 2017 22:32:02 +0200 Subject: Unnecessary "include WaitForAjax" and "include ApiHelpers" Removed all the unnecessary include of `WaitForAjax` and `ApiHelpers` in the specs. Removed unnecessary usage of `api:true` --- spec/requests/api/access_requests_spec.rb | 4 +--- spec/requests/api/award_emoji_spec.rb | 3 +-- spec/requests/api/boards_spec.rb | 4 +--- spec/requests/api/branches_spec.rb | 4 +--- spec/requests/api/broadcast_messages_spec.rb | 4 +--- spec/requests/api/commit_statuses_spec.rb | 4 +--- spec/requests/api/commits_spec.rb | 3 +-- spec/requests/api/deploy_keys_spec.rb | 4 +--- spec/requests/api/deployments_spec.rb | 4 +--- spec/requests/api/doorkeeper_access_spec.rb | 4 +--- spec/requests/api/environments_spec.rb | 4 +--- spec/requests/api/files_spec.rb | 3 +-- spec/requests/api/groups_spec.rb | 3 +-- spec/requests/api/helpers_spec.rb | 2 +- spec/requests/api/internal_spec.rb | 3 +-- spec/requests/api/issues_spec.rb | 3 +-- spec/requests/api/jobs_spec.rb | 4 +--- spec/requests/api/keys_spec.rb | 4 +--- spec/requests/api/labels_spec.rb | 4 +--- spec/requests/api/lint_spec.rb | 4 +--- spec/requests/api/members_spec.rb | 4 +--- spec/requests/api/merge_request_diffs_spec.rb | 4 +--- spec/requests/api/merge_requests_spec.rb | 3 +-- spec/requests/api/milestones_spec.rb | 3 +-- spec/requests/api/namespaces_spec.rb | 3 +-- spec/requests/api/notes_spec.rb | 3 +-- spec/requests/api/notification_settings_spec.rb | 4 +--- spec/requests/api/oauth_tokens_spec.rb | 4 +--- spec/requests/api/pipelines_spec.rb | 4 +--- spec/requests/api/project_hooks_spec.rb | 3 +-- spec/requests/api/project_snippets_spec.rb | 4 +--- spec/requests/api/projects_spec.rb | 2 +- spec/requests/api/repositories_spec.rb | 3 +-- spec/requests/api/runner_spec.rb | 1 - spec/requests/api/runners_spec.rb | 4 +--- spec/requests/api/services_spec.rb | 4 +--- spec/requests/api/session_spec.rb | 4 +--- spec/requests/api/settings_spec.rb | 4 +--- spec/requests/api/sidekiq_metrics_spec.rb | 4 +--- spec/requests/api/snippets_spec.rb | 3 +-- spec/requests/api/system_hooks_spec.rb | 4 +--- spec/requests/api/tags_spec.rb | 3 +-- spec/requests/api/templates_spec.rb | 4 +--- spec/requests/api/todos_spec.rb | 4 +--- spec/requests/api/triggers_spec.rb | 2 -- spec/requests/api/users_spec.rb | 6 ++---- spec/requests/api/v3/award_emoji_spec.rb | 4 +--- spec/requests/api/v3/boards_spec.rb | 4 +--- spec/requests/api/v3/branches_spec.rb | 4 +--- spec/requests/api/v3/broadcast_messages_spec.rb | 4 +--- spec/requests/api/v3/builds_spec.rb | 4 +--- spec/requests/api/v3/commits_spec.rb | 3 +-- spec/requests/api/v3/deploy_keys_spec.rb | 4 +--- spec/requests/api/v3/deployments_spec.rb | 4 +--- spec/requests/api/v3/environments_spec.rb | 4 +--- spec/requests/api/v3/files_spec.rb | 4 +--- spec/requests/api/v3/groups_spec.rb | 3 +-- spec/requests/api/v3/issues_spec.rb | 3 +-- spec/requests/api/v3/labels_spec.rb | 4 +--- spec/requests/api/v3/members_spec.rb | 4 +--- spec/requests/api/v3/merge_request_diffs_spec.rb | 4 +--- spec/requests/api/v3/merge_requests_spec.rb | 3 +-- spec/requests/api/v3/milestones_spec.rb | 3 +-- spec/requests/api/v3/notes_spec.rb | 4 +--- spec/requests/api/v3/pipelines_spec.rb | 4 +--- spec/requests/api/v3/project_hooks_spec.rb | 3 +-- spec/requests/api/v3/project_snippets_spec.rb | 4 +--- spec/requests/api/v3/projects_spec.rb | 3 +-- spec/requests/api/v3/repositories_spec.rb | 3 +-- spec/requests/api/v3/runners_spec.rb | 4 +--- spec/requests/api/v3/services_spec.rb | 4 +--- spec/requests/api/v3/settings_spec.rb | 4 +--- spec/requests/api/v3/snippets_spec.rb | 3 +-- spec/requests/api/v3/system_hooks_spec.rb | 4 +--- spec/requests/api/v3/tags_spec.rb | 3 +-- spec/requests/api/v3/templates_spec.rb | 4 +--- spec/requests/api/v3/todos_spec.rb | 4 +--- spec/requests/api/v3/triggers_spec.rb | 2 -- spec/requests/api/v3/users_spec.rb | 4 +--- spec/requests/api/variables_spec.rb | 4 +--- spec/requests/api/version_spec.rb | 4 +--- spec/requests/ci/api/builds_spec.rb | 2 -- spec/requests/ci/api/runners_spec.rb | 1 - spec/requests/ci/api/triggers_spec.rb | 2 -- spec/requests/openid_connect_spec.rb | 2 -- spec/requests/projects/cycle_analytics_events_spec.rb | 4 +--- 86 files changed, 80 insertions(+), 222 deletions(-) (limited to 'spec/requests') diff --git a/spec/requests/api/access_requests_spec.rb b/spec/requests/api/access_requests_spec.rb index 46edbd49b28..c8eacb38e6f 100644 --- a/spec/requests/api/access_requests_spec.rb +++ b/spec/requests/api/access_requests_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::AccessRequests, api: true do - include ApiHelpers - +describe API::AccessRequests do let(:master) { create(:user) } let(:developer) { create(:user) } let(:access_requester) { create(:user) } diff --git a/spec/requests/api/award_emoji_spec.rb b/spec/requests/api/award_emoji_spec.rb index f4d4a8a2cc7..bbdef0aeb1b 100644 --- a/spec/requests/api/award_emoji_spec.rb +++ b/spec/requests/api/award_emoji_spec.rb @@ -1,7 +1,6 @@ require 'spec_helper' -describe API::AwardEmoji, api: true do - include ApiHelpers +describe API::AwardEmoji do let(:user) { create(:user) } let!(:project) { create(:empty_project) } let(:issue) { create(:issue, project: project) } diff --git a/spec/requests/api/boards_spec.rb b/spec/requests/api/boards_spec.rb index 87c36639cd4..c27db716ef8 100644 --- a/spec/requests/api/boards_spec.rb +++ b/spec/requests/api/boards_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::Boards, api: true do - include ApiHelpers - +describe API::Boards do let(:user) { create(:user) } let(:user2) { create(:user) } let(:non_member) { create(:user) } diff --git a/spec/requests/api/branches_spec.rb b/spec/requests/api/branches_spec.rb index a70f7beaae0..7eaa89837c8 100644 --- a/spec/requests/api/branches_spec.rb +++ b/spec/requests/api/branches_spec.rb @@ -1,9 +1,7 @@ require 'spec_helper' require 'mime/types' -describe API::Branches, api: true do - include ApiHelpers - +describe API::Branches do let(:user) { create(:user) } let!(:project) { create(:project, :repository, creator: user) } let!(:master) { create(:project_member, :master, user: user, project: project) } diff --git a/spec/requests/api/broadcast_messages_spec.rb b/spec/requests/api/broadcast_messages_spec.rb index 024fa66848c..67989689799 100644 --- a/spec/requests/api/broadcast_messages_spec.rb +++ b/spec/requests/api/broadcast_messages_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::BroadcastMessages, api: true do - include ApiHelpers - +describe API::BroadcastMessages do let(:user) { create(:user) } let(:admin) { create(:admin) } diff --git a/spec/requests/api/commit_statuses_spec.rb b/spec/requests/api/commit_statuses_spec.rb index d8b3cc041a5..1233cdc64c4 100644 --- a/spec/requests/api/commit_statuses_spec.rb +++ b/spec/requests/api/commit_statuses_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::CommitStatuses, api: true do - include ApiHelpers - +describe API::CommitStatuses do let!(:project) { create(:project, :repository) } let(:commit) { project.repository.commit } let(:guest) { create_user(:guest) } diff --git a/spec/requests/api/commits_spec.rb b/spec/requests/api/commits_spec.rb index 42dbab586cd..0b0e4c2b112 100644 --- a/spec/requests/api/commits_spec.rb +++ b/spec/requests/api/commits_spec.rb @@ -1,8 +1,7 @@ require 'spec_helper' require 'mime/types' -describe API::Commits, api: true do - include ApiHelpers +describe API::Commits do let(:user) { create(:user) } let(:user2) { create(:user) } let!(:project) { create(:project, :repository, creator: user, namespace: user.namespace) } diff --git a/spec/requests/api/deploy_keys_spec.rb b/spec/requests/api/deploy_keys_spec.rb index e1beac28dab..843e9862b0c 100644 --- a/spec/requests/api/deploy_keys_spec.rb +++ b/spec/requests/api/deploy_keys_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::DeployKeys, api: true do - include ApiHelpers - +describe API::DeployKeys do let(:user) { create(:user) } let(:admin) { create(:admin) } let(:project) { create(:empty_project, creator_id: user.id) } diff --git a/spec/requests/api/deployments_spec.rb b/spec/requests/api/deployments_spec.rb index e55575ffbda..90d78d060ca 100644 --- a/spec/requests/api/deployments_spec.rb +++ b/spec/requests/api/deployments_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::Deployments, api: true do - include ApiHelpers - +describe API::Deployments do let(:user) { create(:user) } let(:non_member) { create(:user) } let(:project) { deployment.environment.project } diff --git a/spec/requests/api/doorkeeper_access_spec.rb b/spec/requests/api/doorkeeper_access_spec.rb index f6fd567eca5..b5897b2e346 100644 --- a/spec/requests/api/doorkeeper_access_spec.rb +++ b/spec/requests/api/doorkeeper_access_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::API, api: true do - include ApiHelpers - +describe API::API do let!(:user) { create(:user) } let!(:application) { Doorkeeper::Application.create!(name: "MyApp", redirect_uri: "https://app.com", owner: user) } let!(:token) { Doorkeeper::AccessToken.create! application_id: application.id, resource_owner_id: user.id, scopes: "api" } diff --git a/spec/requests/api/environments_spec.rb b/spec/requests/api/environments_spec.rb index b54ee8e8b85..aae03c84e1f 100644 --- a/spec/requests/api/environments_spec.rb +++ b/spec/requests/api/environments_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::Environments, api: true do - include ApiHelpers - +describe API::Environments do let(:user) { create(:user) } let(:non_member) { create(:user) } let(:project) { create(:empty_project, :private, namespace: user.namespace) } diff --git a/spec/requests/api/files_spec.rb b/spec/requests/api/files_spec.rb index 6db2faed76b..fa28047d49c 100644 --- a/spec/requests/api/files_spec.rb +++ b/spec/requests/api/files_spec.rb @@ -1,7 +1,6 @@ require 'spec_helper' -describe API::Files, api: true do - include ApiHelpers +describe API::Files do let(:user) { create(:user) } let!(:project) { create(:project, :repository, namespace: user.namespace ) } let(:guest) { create(:user) { |u| project.add_guest(u) } } diff --git a/spec/requests/api/groups_spec.rb b/spec/requests/api/groups_spec.rb index 2545da7b1db..3e27a3bee77 100644 --- a/spec/requests/api/groups_spec.rb +++ b/spec/requests/api/groups_spec.rb @@ -1,7 +1,6 @@ require 'spec_helper' -describe API::Groups, api: true do - include ApiHelpers +describe API::Groups do include UploadHelpers let(:user1) { create(:user, can_create_group: false) } diff --git a/spec/requests/api/helpers_spec.rb b/spec/requests/api/helpers_spec.rb index 988a57a80ea..4845ab1ae1f 100644 --- a/spec/requests/api/helpers_spec.rb +++ b/spec/requests/api/helpers_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe API::Helpers, api: true do +describe API::Helpers do include API::APIGuard::HelperMethods include API::Helpers include SentryHelper diff --git a/spec/requests/api/internal_spec.rb b/spec/requests/api/internal_spec.rb index 3d6010ede73..429f1a4e375 100644 --- a/spec/requests/api/internal_spec.rb +++ b/spec/requests/api/internal_spec.rb @@ -1,7 +1,6 @@ require 'spec_helper' -describe API::Internal, api: true do - include ApiHelpers +describe API::Internal do let(:user) { create(:user) } let(:key) { create(:key, user: user) } let(:project) { create(:project, :repository) } diff --git a/spec/requests/api/issues_spec.rb b/spec/requests/api/issues_spec.rb index 551aae7d701..b37be1e0c50 100644 --- a/spec/requests/api/issues_spec.rb +++ b/spec/requests/api/issues_spec.rb @@ -1,7 +1,6 @@ require 'spec_helper' -describe API::Issues, api: true do - include ApiHelpers +describe API::Issues do include EmailHelpers let(:user) { create(:user) } diff --git a/spec/requests/api/jobs_spec.rb b/spec/requests/api/jobs_spec.rb index d8a56c02a63..decb5b91941 100644 --- a/spec/requests/api/jobs_spec.rb +++ b/spec/requests/api/jobs_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::Jobs, api: true do - include ApiHelpers - +describe API::Jobs do let(:user) { create(:user) } let(:api_user) { user } let!(:project) { create(:project, :repository, creator: user, public_builds: false) } diff --git a/spec/requests/api/keys_spec.rb b/spec/requests/api/keys_spec.rb index 4c80987d680..b5586088485 100644 --- a/spec/requests/api/keys_spec.rb +++ b/spec/requests/api/keys_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::Keys, api: true do - include ApiHelpers - +describe API::Keys do let(:user) { create(:user) } let(:admin) { create(:admin) } let(:key) { create(:key, user: user) } diff --git a/spec/requests/api/labels_spec.rb b/spec/requests/api/labels_spec.rb index a1adaba7b98..0c6b55c1630 100644 --- a/spec/requests/api/labels_spec.rb +++ b/spec/requests/api/labels_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::Labels, api: true do - include ApiHelpers - +describe API::Labels do let(:user) { create(:user) } let(:project) { create(:empty_project, creator_id: user.id, namespace: user.namespace) } let!(:label1) { create(:label, title: 'label1', project: project) } diff --git a/spec/requests/api/lint_spec.rb b/spec/requests/api/lint_spec.rb index 391fc13a380..df7c91b5bc1 100644 --- a/spec/requests/api/lint_spec.rb +++ b/spec/requests/api/lint_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::Lint, api: true do - include ApiHelpers - +describe API::Lint do describe 'POST /ci/lint' do context 'with valid .gitlab-ci.yaml content' do let(:yaml_content) do diff --git a/spec/requests/api/members_spec.rb b/spec/requests/api/members_spec.rb index 84dca51801f..e095053fa03 100644 --- a/spec/requests/api/members_spec.rb +++ b/spec/requests/api/members_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::Members, api: true do - include ApiHelpers - +describe API::Members do let(:master) { create(:user, username: 'master_user') } let(:developer) { create(:user) } let(:access_requester) { create(:user) } diff --git a/spec/requests/api/merge_request_diffs_spec.rb b/spec/requests/api/merge_request_diffs_spec.rb index 79f3151ba52..d1b22179888 100644 --- a/spec/requests/api/merge_request_diffs_spec.rb +++ b/spec/requests/api/merge_request_diffs_spec.rb @@ -1,8 +1,6 @@ require "spec_helper" -describe API::MergeRequestDiffs, 'MergeRequestDiffs', api: true do - include ApiHelpers - +describe API::MergeRequestDiffs, 'MergeRequestDiffs' do let!(:user) { create(:user) } let!(:merge_request) { create(:merge_request, importing: true) } let!(:project) { merge_request.target_project } diff --git a/spec/requests/api/merge_requests_spec.rb b/spec/requests/api/merge_requests_spec.rb index 61d965e8974..46f76003cf7 100644 --- a/spec/requests/api/merge_requests_spec.rb +++ b/spec/requests/api/merge_requests_spec.rb @@ -1,7 +1,6 @@ require "spec_helper" -describe API::MergeRequests, api: true do - include ApiHelpers +describe API::MergeRequests do let(:base_time) { Time.now } let(:user) { create(:user) } let(:admin) { create(:user, :admin) } diff --git a/spec/requests/api/milestones_spec.rb b/spec/requests/api/milestones_spec.rb index 598968aff70..dd74351a2b1 100644 --- a/spec/requests/api/milestones_spec.rb +++ b/spec/requests/api/milestones_spec.rb @@ -1,7 +1,6 @@ require 'spec_helper' -describe API::Milestones, api: true do - include ApiHelpers +describe API::Milestones do let(:user) { create(:user) } let!(:project) { create(:empty_project, namespace: user.namespace ) } let!(:closed_milestone) { create(:closed_milestone, project: project, title: 'version1', description: 'closed milestone') } diff --git a/spec/requests/api/namespaces_spec.rb b/spec/requests/api/namespaces_spec.rb index da8fa06d0af..3bf16a3ae27 100644 --- a/spec/requests/api/namespaces_spec.rb +++ b/spec/requests/api/namespaces_spec.rb @@ -1,7 +1,6 @@ require 'spec_helper' -describe API::Namespaces, api: true do - include ApiHelpers +describe API::Namespaces do let(:admin) { create(:admin) } let(:user) { create(:user) } let!(:group1) { create(:group) } diff --git a/spec/requests/api/notes_spec.rb b/spec/requests/api/notes_spec.rb index d8eb8ce921e..6afcd237c3c 100644 --- a/spec/requests/api/notes_spec.rb +++ b/spec/requests/api/notes_spec.rb @@ -1,7 +1,6 @@ require 'spec_helper' -describe API::Notes, api: true do - include ApiHelpers +describe API::Notes do let(:user) { create(:user) } let!(:project) { create(:empty_project, :public, namespace: user.namespace) } let!(:issue) { create(:issue, project: project, author: user) } diff --git a/spec/requests/api/notification_settings_spec.rb b/spec/requests/api/notification_settings_spec.rb index 39d3afcb78f..f619b7e6eaf 100644 --- a/spec/requests/api/notification_settings_spec.rb +++ b/spec/requests/api/notification_settings_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::NotificationSettings, api: true do - include ApiHelpers - +describe API::NotificationSettings do let(:user) { create(:user) } let!(:group) { create(:group) } let!(:project) { create(:empty_project, :public, creator_id: user.id, namespace: group) } diff --git a/spec/requests/api/oauth_tokens_spec.rb b/spec/requests/api/oauth_tokens_spec.rb index 367225df717..819df105960 100644 --- a/spec/requests/api/oauth_tokens_spec.rb +++ b/spec/requests/api/oauth_tokens_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::API, api: true do - include ApiHelpers - +describe API::API do context 'Resource Owner Password Credentials' do def request_oauth_token(user) post '/oauth/token', username: user.username, password: user.password, grant_type: 'password' diff --git a/spec/requests/api/pipelines_spec.rb b/spec/requests/api/pipelines_spec.rb index 51af999b455..762345cd41c 100644 --- a/spec/requests/api/pipelines_spec.rb +++ b/spec/requests/api/pipelines_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::Pipelines, api: true do - include ApiHelpers - +describe API::Pipelines do let(:user) { create(:user) } let(:non_member) { create(:user) } let(:project) { create(:project, :repository, creator: user) } diff --git a/spec/requests/api/project_hooks_spec.rb b/spec/requests/api/project_hooks_spec.rb index b1603233f9e..aee0e17a153 100644 --- a/spec/requests/api/project_hooks_spec.rb +++ b/spec/requests/api/project_hooks_spec.rb @@ -1,7 +1,6 @@ require 'spec_helper' -describe API::ProjectHooks, 'ProjectHooks', api: true do - include ApiHelpers +describe API::ProjectHooks, 'ProjectHooks' do let(:user) { create(:user) } let(:user3) { create(:user) } let!(:project) { create(:empty_project, creator_id: user.id, namespace: user.namespace) } diff --git a/spec/requests/api/project_snippets_spec.rb b/spec/requests/api/project_snippets_spec.rb index 9e88c19b0bc..3ab1764f5c3 100644 --- a/spec/requests/api/project_snippets_spec.rb +++ b/spec/requests/api/project_snippets_spec.rb @@ -1,8 +1,6 @@ require 'rails_helper' -describe API::ProjectSnippets, api: true do - include ApiHelpers - +describe API::ProjectSnippets do let(:project) { create(:empty_project, :public) } let(:user) { create(:user) } let(:admin) { create(:admin) } diff --git a/spec/requests/api/projects_spec.rb b/spec/requests/api/projects_spec.rb index 74bc4847247..bda5e1fbeec 100644 --- a/spec/requests/api/projects_spec.rb +++ b/spec/requests/api/projects_spec.rb @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- require 'spec_helper' -describe API::Projects, :api do +describe API::Projects do include Gitlab::CurrentSettings let(:user) { create(:user) } diff --git a/spec/requests/api/repositories_spec.rb b/spec/requests/api/repositories_spec.rb index 4783d011d54..1a0695615e3 100644 --- a/spec/requests/api/repositories_spec.rb +++ b/spec/requests/api/repositories_spec.rb @@ -1,8 +1,7 @@ require 'spec_helper' require 'mime/types' -describe API::Repositories, api: true do - include ApiHelpers +describe API::Repositories do include RepoHelpers include WorkhorseHelpers diff --git a/spec/requests/api/runner_spec.rb b/spec/requests/api/runner_spec.rb index 409a59d6c23..be83514ed9c 100644 --- a/spec/requests/api/runner_spec.rb +++ b/spec/requests/api/runner_spec.rb @@ -1,7 +1,6 @@ require 'spec_helper' describe API::Runner do - include ApiHelpers include StubGitlabCalls let(:registration_token) { 'abcdefg123456' } diff --git a/spec/requests/api/runners_spec.rb b/spec/requests/api/runners_spec.rb index 8a82543a830..645a5389850 100644 --- a/spec/requests/api/runners_spec.rb +++ b/spec/requests/api/runners_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::Runners, api: true do - include ApiHelpers - +describe API::Runners do let(:admin) { create(:user, :admin) } let(:user) { create(:user) } let(:user2) { create(:user) } diff --git a/spec/requests/api/services_spec.rb b/spec/requests/api/services_spec.rb index fd334934ca5..95df3429314 100644 --- a/spec/requests/api/services_spec.rb +++ b/spec/requests/api/services_spec.rb @@ -1,8 +1,6 @@ require "spec_helper" -describe API::Services, api: true do - include ApiHelpers - +describe API::Services do let(:user) { create(:user) } let(:admin) { create(:admin) } let(:user2) { create(:user) } diff --git a/spec/requests/api/session_spec.rb b/spec/requests/api/session_spec.rb index 393bf076616..5e77519c867 100644 --- a/spec/requests/api/session_spec.rb +++ b/spec/requests/api/session_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::Session, api: true do - include ApiHelpers - +describe API::Session do let(:user) { create(:user) } describe "POST /session" do diff --git a/spec/requests/api/settings_spec.rb b/spec/requests/api/settings_spec.rb index 11b4b718e2c..2398ae6219c 100644 --- a/spec/requests/api/settings_spec.rb +++ b/spec/requests/api/settings_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::Settings, 'Settings', api: true do - include ApiHelpers - +describe API::Settings, 'Settings' do let(:user) { create(:user) } let(:admin) { create(:admin) } diff --git a/spec/requests/api/sidekiq_metrics_spec.rb b/spec/requests/api/sidekiq_metrics_spec.rb index 28067f8ca88..83042d0cb12 100644 --- a/spec/requests/api/sidekiq_metrics_spec.rb +++ b/spec/requests/api/sidekiq_metrics_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::SidekiqMetrics, api: true do - include ApiHelpers - +describe API::SidekiqMetrics do let(:admin) { create(:user, :admin) } describe 'GET sidekiq/*' do diff --git a/spec/requests/api/snippets_spec.rb b/spec/requests/api/snippets_spec.rb index 5d75b47b3cd..e429cddcf6a 100644 --- a/spec/requests/api/snippets_spec.rb +++ b/spec/requests/api/snippets_spec.rb @@ -1,7 +1,6 @@ require 'rails_helper' -describe API::Snippets, api: true do - include ApiHelpers +describe API::Snippets do let!(:user) { create(:user) } describe 'GET /snippets/' do diff --git a/spec/requests/api/system_hooks_spec.rb b/spec/requests/api/system_hooks_spec.rb index d1e10f12657..c7b84173570 100644 --- a/spec/requests/api/system_hooks_spec.rb +++ b/spec/requests/api/system_hooks_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::SystemHooks, api: true do - include ApiHelpers - +describe API::SystemHooks do let(:user) { create(:user) } let(:admin) { create(:admin) } let!(:hook) { create(:system_hook, url: "http://example.com") } diff --git a/spec/requests/api/tags_spec.rb b/spec/requests/api/tags_spec.rb index b132d033a61..ef7d0c3ee41 100644 --- a/spec/requests/api/tags_spec.rb +++ b/spec/requests/api/tags_spec.rb @@ -1,8 +1,7 @@ require 'spec_helper' require 'mime/types' -describe API::Tags, api: true do - include ApiHelpers +describe API::Tags do include RepoHelpers let(:user) { create(:user) } diff --git a/spec/requests/api/templates_spec.rb b/spec/requests/api/templates_spec.rb index 2c83e119065..cb55985e3f5 100644 --- a/spec/requests/api/templates_spec.rb +++ b/spec/requests/api/templates_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::Templates, api: true do - include ApiHelpers - +describe API::Templates do context 'the Template Entity' do before { get api('/templates/gitignores/Ruby') } diff --git a/spec/requests/api/todos_spec.rb b/spec/requests/api/todos_spec.rb index b789284fa8d..92533f4dfea 100644 --- a/spec/requests/api/todos_spec.rb +++ b/spec/requests/api/todos_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::Todos, api: true do - include ApiHelpers - +describe API::Todos do let(:project_1) { create(:empty_project, :test_repo) } let(:project_2) { create(:empty_project) } let(:author_1) { create(:user) } diff --git a/spec/requests/api/triggers_spec.rb b/spec/requests/api/triggers_spec.rb index d93a734f5b6..16ddade27d9 100644 --- a/spec/requests/api/triggers_spec.rb +++ b/spec/requests/api/triggers_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' describe API::Triggers do - include ApiHelpers - let(:user) { create(:user) } let(:user2) { create(:user) } let!(:trigger_token) { 'secure_token' } diff --git a/spec/requests/api/users_spec.rb b/spec/requests/api/users_spec.rb index 165ab389917..2c6ae592d91 100644 --- a/spec/requests/api/users_spec.rb +++ b/spec/requests/api/users_spec.rb @@ -1,9 +1,7 @@ require 'spec_helper' -describe API::Users, api: true do - include ApiHelpers - - let(:user) { create(:user) } +describe API::Users do + let(:user) { create(:user) } let(:admin) { create(:admin) } let(:key) { create(:key, user: user) } let(:email) { create(:email, user: user) } diff --git a/spec/requests/api/v3/award_emoji_spec.rb b/spec/requests/api/v3/award_emoji_spec.rb index eeb4d128c1b..9234710f488 100644 --- a/spec/requests/api/v3/award_emoji_spec.rb +++ b/spec/requests/api/v3/award_emoji_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::V3::AwardEmoji, api: true do - include ApiHelpers - +describe API::V3::AwardEmoji do let(:user) { create(:user) } let!(:project) { create(:empty_project) } let(:issue) { create(:issue, project: project) } diff --git a/spec/requests/api/v3/boards_spec.rb b/spec/requests/api/v3/boards_spec.rb index eb95934f354..4d786331d1b 100644 --- a/spec/requests/api/v3/boards_spec.rb +++ b/spec/requests/api/v3/boards_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::V3::Boards, api: true do - include ApiHelpers - +describe API::V3::Boards do let(:user) { create(:user) } let(:guest) { create(:user) } let(:non_member) { create(:user) } diff --git a/spec/requests/api/v3/branches_spec.rb b/spec/requests/api/v3/branches_spec.rb index 5dcd4f21f4e..72f8fbe71fb 100644 --- a/spec/requests/api/v3/branches_spec.rb +++ b/spec/requests/api/v3/branches_spec.rb @@ -1,9 +1,7 @@ require 'spec_helper' require 'mime/types' -describe API::V3::Branches, api: true do - include ApiHelpers - +describe API::V3::Branches do let(:user) { create(:user) } let(:user2) { create(:user) } let!(:project) { create(:project, :repository, creator: user) } diff --git a/spec/requests/api/v3/broadcast_messages_spec.rb b/spec/requests/api/v3/broadcast_messages_spec.rb index 06556401a29..948cd78c177 100644 --- a/spec/requests/api/v3/broadcast_messages_spec.rb +++ b/spec/requests/api/v3/broadcast_messages_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::V3::BroadcastMessages, api: true do - include ApiHelpers - +describe API::V3::BroadcastMessages do let(:user) { create(:user) } let(:admin) { create(:admin) } diff --git a/spec/requests/api/v3/builds_spec.rb b/spec/requests/api/v3/builds_spec.rb index e97d2b0cee0..dc95599546c 100644 --- a/spec/requests/api/v3/builds_spec.rb +++ b/spec/requests/api/v3/builds_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::V3::Builds, api: true do - include ApiHelpers - +describe API::V3::Builds do let(:user) { create(:user) } let(:api_user) { user } let!(:project) { create(:project, :repository, creator: user, public_builds: false) } diff --git a/spec/requests/api/v3/commits_spec.rb b/spec/requests/api/v3/commits_spec.rb index 0a28cb9bddb..c2e8c3ae6f7 100644 --- a/spec/requests/api/v3/commits_spec.rb +++ b/spec/requests/api/v3/commits_spec.rb @@ -1,8 +1,7 @@ require 'spec_helper' require 'mime/types' -describe API::V3::Commits, api: true do - include ApiHelpers +describe API::V3::Commits do let(:user) { create(:user) } let(:user2) { create(:user) } let!(:project) { create(:project, :repository, creator: user, namespace: user.namespace) } diff --git a/spec/requests/api/v3/deploy_keys_spec.rb b/spec/requests/api/v3/deploy_keys_spec.rb index f5bdf408c5e..b61b2b618a6 100644 --- a/spec/requests/api/v3/deploy_keys_spec.rb +++ b/spec/requests/api/v3/deploy_keys_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::V3::DeployKeys, api: true do - include ApiHelpers - +describe API::V3::DeployKeys do let(:user) { create(:user) } let(:admin) { create(:admin) } let(:project) { create(:empty_project, creator_id: user.id) } diff --git a/spec/requests/api/v3/deployments_spec.rb b/spec/requests/api/v3/deployments_spec.rb index 3c5ce407b32..694786c3046 100644 --- a/spec/requests/api/v3/deployments_spec.rb +++ b/spec/requests/api/v3/deployments_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::Deployments, api: true do - include ApiHelpers - +describe API::Deployments do let(:user) { create(:user) } let(:non_member) { create(:user) } let(:project) { deployment.environment.project } diff --git a/spec/requests/api/v3/environments_spec.rb b/spec/requests/api/v3/environments_spec.rb index 216192c9d34..99f35723974 100644 --- a/spec/requests/api/v3/environments_spec.rb +++ b/spec/requests/api/v3/environments_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::V3::Environments, api: true do - include ApiHelpers - +describe API::V3::Environments do let(:user) { create(:user) } let(:non_member) { create(:user) } let(:project) { create(:empty_project, :private, namespace: user.namespace) } diff --git a/spec/requests/api/v3/files_spec.rb b/spec/requests/api/v3/files_spec.rb index c45e2028e1d..5bcbb441979 100644 --- a/spec/requests/api/v3/files_spec.rb +++ b/spec/requests/api/v3/files_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::V3::Files, api: true do - include ApiHelpers - +describe API::V3::Files do # I have to remove periods from the end of the name # This happened when the user's name had a suffix (i.e. "Sr.") # This seems to be what git does under the hood. For example, this commit: diff --git a/spec/requests/api/v3/groups_spec.rb b/spec/requests/api/v3/groups_spec.rb index a71b7d4b008..2862580cc70 100644 --- a/spec/requests/api/v3/groups_spec.rb +++ b/spec/requests/api/v3/groups_spec.rb @@ -1,7 +1,6 @@ require 'spec_helper' -describe API::V3::Groups, api: true do - include ApiHelpers +describe API::V3::Groups do include UploadHelpers let(:user1) { create(:user, can_create_group: false) } diff --git a/spec/requests/api/v3/issues_spec.rb b/spec/requests/api/v3/issues_spec.rb index 91d9057075f..ef5b10a1615 100644 --- a/spec/requests/api/v3/issues_spec.rb +++ b/spec/requests/api/v3/issues_spec.rb @@ -1,7 +1,6 @@ require 'spec_helper' -describe API::V3::Issues, api: true do - include ApiHelpers +describe API::V3::Issues do include EmailHelpers let(:user) { create(:user) } diff --git a/spec/requests/api/v3/labels_spec.rb b/spec/requests/api/v3/labels_spec.rb index dfac357d37c..62faa1cb129 100644 --- a/spec/requests/api/v3/labels_spec.rb +++ b/spec/requests/api/v3/labels_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::V3::Labels, api: true do - include ApiHelpers - +describe API::V3::Labels do let(:user) { create(:user) } let(:project) { create(:empty_project, creator_id: user.id, namespace: user.namespace) } let!(:label1) { create(:label, title: 'label1', project: project) } diff --git a/spec/requests/api/v3/members_spec.rb b/spec/requests/api/v3/members_spec.rb index af1c5cff67f..623f02902b8 100644 --- a/spec/requests/api/v3/members_spec.rb +++ b/spec/requests/api/v3/members_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::V3::Members, api: true do - include ApiHelpers - +describe API::V3::Members do let(:master) { create(:user, username: 'master_user') } let(:developer) { create(:user) } let(:access_requester) { create(:user) } diff --git a/spec/requests/api/v3/merge_request_diffs_spec.rb b/spec/requests/api/v3/merge_request_diffs_spec.rb index c53800eef30..8020ddab4c8 100644 --- a/spec/requests/api/v3/merge_request_diffs_spec.rb +++ b/spec/requests/api/v3/merge_request_diffs_spec.rb @@ -1,8 +1,6 @@ require "spec_helper" -describe API::V3::MergeRequestDiffs, 'MergeRequestDiffs', api: true do - include ApiHelpers - +describe API::V3::MergeRequestDiffs, 'MergeRequestDiffs' do let!(:user) { create(:user) } let!(:merge_request) { create(:merge_request, importing: true) } let!(:project) { merge_request.target_project } diff --git a/spec/requests/api/v3/merge_requests_spec.rb b/spec/requests/api/v3/merge_requests_spec.rb index d73e9635c9b..6c2950a6e6f 100644 --- a/spec/requests/api/v3/merge_requests_spec.rb +++ b/spec/requests/api/v3/merge_requests_spec.rb @@ -1,7 +1,6 @@ require "spec_helper" -describe API::MergeRequests, api: true do - include ApiHelpers +describe API::MergeRequests do let(:base_time) { Time.now } let(:user) { create(:user) } let(:admin) { create(:user, :admin) } diff --git a/spec/requests/api/v3/milestones_spec.rb b/spec/requests/api/v3/milestones_spec.rb index 127c0eec881..f04efc990a7 100644 --- a/spec/requests/api/v3/milestones_spec.rb +++ b/spec/requests/api/v3/milestones_spec.rb @@ -1,7 +1,6 @@ require 'spec_helper' -describe API::V3::Milestones, api: true do - include ApiHelpers +describe API::V3::Milestones do let(:user) { create(:user) } let!(:project) { create(:empty_project, namespace: user.namespace ) } let!(:closed_milestone) { create(:closed_milestone, project: project) } diff --git a/spec/requests/api/v3/notes_spec.rb b/spec/requests/api/v3/notes_spec.rb index ddef2d5eb04..2bae4a60931 100644 --- a/spec/requests/api/v3/notes_spec.rb +++ b/spec/requests/api/v3/notes_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::V3::Notes, api: true do - include ApiHelpers - +describe API::V3::Notes do let(:user) { create(:user) } let!(:project) { create(:empty_project, :public, namespace: user.namespace) } let!(:issue) { create(:issue, project: project, author: user) } diff --git a/spec/requests/api/v3/pipelines_spec.rb b/spec/requests/api/v3/pipelines_spec.rb index 3786eb06932..e1d036ff365 100644 --- a/spec/requests/api/v3/pipelines_spec.rb +++ b/spec/requests/api/v3/pipelines_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::V3::Pipelines, api: true do - include ApiHelpers - +describe API::V3::Pipelines do let(:user) { create(:user) } let(:non_member) { create(:user) } let(:project) { create(:project, :repository, creator: user) } diff --git a/spec/requests/api/v3/project_hooks_spec.rb b/spec/requests/api/v3/project_hooks_spec.rb index a981119dc5a..a3a4c77d09d 100644 --- a/spec/requests/api/v3/project_hooks_spec.rb +++ b/spec/requests/api/v3/project_hooks_spec.rb @@ -1,7 +1,6 @@ require 'spec_helper' -describe API::ProjectHooks, 'ProjectHooks', api: true do - include ApiHelpers +describe API::ProjectHooks, 'ProjectHooks' do let(:user) { create(:user) } let(:user3) { create(:user) } let!(:project) { create(:project, creator_id: user.id, namespace: user.namespace) } diff --git a/spec/requests/api/v3/project_snippets_spec.rb b/spec/requests/api/v3/project_snippets_spec.rb index 957a3bf97ef..365e7365fda 100644 --- a/spec/requests/api/v3/project_snippets_spec.rb +++ b/spec/requests/api/v3/project_snippets_spec.rb @@ -1,8 +1,6 @@ require 'rails_helper' -describe API::ProjectSnippets, api: true do - include ApiHelpers - +describe API::ProjectSnippets do let(:project) { create(:empty_project, :public) } let(:user) { create(:user) } let(:admin) { create(:admin) } diff --git a/spec/requests/api/v3/projects_spec.rb b/spec/requests/api/v3/projects_spec.rb index 40531fe7545..e15b90d7a9e 100644 --- a/spec/requests/api/v3/projects_spec.rb +++ b/spec/requests/api/v3/projects_spec.rb @@ -1,7 +1,6 @@ require 'spec_helper' -describe API::V3::Projects, api: true do - include ApiHelpers +describe API::V3::Projects do include Gitlab::CurrentSettings let(:user) { create(:user) } diff --git a/spec/requests/api/v3/repositories_spec.rb b/spec/requests/api/v3/repositories_spec.rb index fef6fb641fa..1a55e2a71cd 100644 --- a/spec/requests/api/v3/repositories_spec.rb +++ b/spec/requests/api/v3/repositories_spec.rb @@ -1,8 +1,7 @@ require 'spec_helper' require 'mime/types' -describe API::V3::Repositories, api: true do - include ApiHelpers +describe API::V3::Repositories do include RepoHelpers include WorkhorseHelpers diff --git a/spec/requests/api/v3/runners_spec.rb b/spec/requests/api/v3/runners_spec.rb index ca335ce9cf0..dbda2cf34c3 100644 --- a/spec/requests/api/v3/runners_spec.rb +++ b/spec/requests/api/v3/runners_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::V3::Runners, api: true do - include ApiHelpers - +describe API::V3::Runners do let(:admin) { create(:user, :admin) } let(:user) { create(:user) } let(:user2) { create(:user) } diff --git a/spec/requests/api/v3/services_spec.rb b/spec/requests/api/v3/services_spec.rb index 3a760a8f25c..3ba62de822a 100644 --- a/spec/requests/api/v3/services_spec.rb +++ b/spec/requests/api/v3/services_spec.rb @@ -1,8 +1,6 @@ require "spec_helper" -describe API::V3::Services, api: true do - include ApiHelpers - +describe API::V3::Services do let(:user) { create(:user) } let(:project) { create(:empty_project, creator_id: user.id, namespace: user.namespace) } diff --git a/spec/requests/api/v3/settings_spec.rb b/spec/requests/api/v3/settings_spec.rb index a9fa5adac17..41d039b7da0 100644 --- a/spec/requests/api/v3/settings_spec.rb +++ b/spec/requests/api/v3/settings_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::V3::Settings, 'Settings', api: true do - include ApiHelpers - +describe API::V3::Settings, 'Settings' do let(:user) { create(:user) } let(:admin) { create(:admin) } diff --git a/spec/requests/api/v3/snippets_spec.rb b/spec/requests/api/v3/snippets_spec.rb index 05653bd0d51..4f02b7b1a54 100644 --- a/spec/requests/api/v3/snippets_spec.rb +++ b/spec/requests/api/v3/snippets_spec.rb @@ -1,7 +1,6 @@ require 'rails_helper' -describe API::V3::Snippets, api: true do - include ApiHelpers +describe API::V3::Snippets do let!(:user) { create(:user) } describe 'GET /snippets/' do diff --git a/spec/requests/api/v3/system_hooks_spec.rb b/spec/requests/api/v3/system_hooks_spec.rb index 91038977c82..72c7d14b8ba 100644 --- a/spec/requests/api/v3/system_hooks_spec.rb +++ b/spec/requests/api/v3/system_hooks_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::V3::SystemHooks, api: true do - include ApiHelpers - +describe API::V3::SystemHooks do let(:user) { create(:user) } let(:admin) { create(:admin) } let!(:hook) { create(:system_hook, url: "http://example.com") } diff --git a/spec/requests/api/v3/tags_spec.rb b/spec/requests/api/v3/tags_spec.rb index 6870cfd2668..1c4b25c47c3 100644 --- a/spec/requests/api/v3/tags_spec.rb +++ b/spec/requests/api/v3/tags_spec.rb @@ -1,8 +1,7 @@ require 'spec_helper' require 'mime/types' -describe API::V3::Tags, api: true do - include ApiHelpers +describe API::V3::Tags do include RepoHelpers let(:user) { create(:user) } diff --git a/spec/requests/api/v3/templates_spec.rb b/spec/requests/api/v3/templates_spec.rb index f1e554b98cc..00446c7f29c 100644 --- a/spec/requests/api/v3/templates_spec.rb +++ b/spec/requests/api/v3/templates_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::V3::Templates, api: true do - include ApiHelpers - +describe API::V3::Templates do shared_examples_for 'the Template Entity' do |path| before { get v3_api(path) } diff --git a/spec/requests/api/v3/todos_spec.rb b/spec/requests/api/v3/todos_spec.rb index 80fa697e949..9c2c4d64257 100644 --- a/spec/requests/api/v3/todos_spec.rb +++ b/spec/requests/api/v3/todos_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::V3::Todos, api: true do - include ApiHelpers - +describe API::V3::Todos do let(:project_1) { create(:empty_project) } let(:project_2) { create(:empty_project) } let(:author_1) { create(:user) } diff --git a/spec/requests/api/v3/triggers_spec.rb b/spec/requests/api/v3/triggers_spec.rb index 9233e9621bf..d3de6bf13bc 100644 --- a/spec/requests/api/v3/triggers_spec.rb +++ b/spec/requests/api/v3/triggers_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' describe API::V3::Triggers do - include ApiHelpers - let(:user) { create(:user) } let(:user2) { create(:user) } let!(:trigger_token) { 'secure_token' } diff --git a/spec/requests/api/v3/users_spec.rb b/spec/requests/api/v3/users_spec.rb index b38cbe74b85..05ee704f738 100644 --- a/spec/requests/api/v3/users_spec.rb +++ b/spec/requests/api/v3/users_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::V3::Users, api: true do - include ApiHelpers - +describe API::V3::Users do let(:user) { create(:user) } let(:admin) { create(:admin) } let(:key) { create(:key, user: user) } diff --git a/spec/requests/api/variables_spec.rb b/spec/requests/api/variables_spec.rb index 0c1413119e0..63d6d3001ac 100644 --- a/spec/requests/api/variables_spec.rb +++ b/spec/requests/api/variables_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::Variables, api: true do - include ApiHelpers - +describe API::Variables do let(:user) { create(:user) } let(:user2) { create(:user) } let!(:project) { create(:empty_project, creator_id: user.id) } diff --git a/spec/requests/api/version_spec.rb b/spec/requests/api/version_spec.rb index da1b2fda70e..8870d48bbc9 100644 --- a/spec/requests/api/version_spec.rb +++ b/spec/requests/api/version_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe API::Version, api: true do - include ApiHelpers - +describe API::Version do describe 'GET /version' do context 'when unauthenticated' do it 'returns authentication error' do diff --git a/spec/requests/ci/api/builds_spec.rb b/spec/requests/ci/api/builds_spec.rb index ef30d8638dd..108f73bb965 100644 --- a/spec/requests/ci/api/builds_spec.rb +++ b/spec/requests/ci/api/builds_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' describe Ci::API::Builds do - include ApiHelpers - let(:runner) { FactoryGirl.create(:ci_runner, tag_list: %w(mysql ruby)) } let(:project) { FactoryGirl.create(:empty_project, shared_runners_enabled: false) } let(:last_update) { nil } diff --git a/spec/requests/ci/api/runners_spec.rb b/spec/requests/ci/api/runners_spec.rb index d50cdfdc2d6..0b9733221d8 100644 --- a/spec/requests/ci/api/runners_spec.rb +++ b/spec/requests/ci/api/runners_spec.rb @@ -1,7 +1,6 @@ require 'spec_helper' describe Ci::API::Runners do - include ApiHelpers include StubGitlabCalls let(:registration_token) { 'abcdefg123456' } diff --git a/spec/requests/ci/api/triggers_spec.rb b/spec/requests/ci/api/triggers_spec.rb index 5321f8b134f..26b03c0f148 100644 --- a/spec/requests/ci/api/triggers_spec.rb +++ b/spec/requests/ci/api/triggers_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' describe Ci::API::Triggers do - include ApiHelpers - describe 'POST /projects/:project_id/refs/:ref/trigger' do let!(:trigger_token) { 'secure token' } let!(:project) { create(:project, :repository, ci_id: 10) } diff --git a/spec/requests/openid_connect_spec.rb b/spec/requests/openid_connect_spec.rb index 5206634bca5..a4f85c22943 100644 --- a/spec/requests/openid_connect_spec.rb +++ b/spec/requests/openid_connect_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' describe 'OpenID Connect requests' do - include ApiHelpers - let(:user) { create :user } let(:access_grant) { create :oauth_access_grant, application: application, resource_owner_id: user.id } let(:access_token) { create :oauth_access_token, application: application, resource_owner_id: user.id } diff --git a/spec/requests/projects/cycle_analytics_events_spec.rb b/spec/requests/projects/cycle_analytics_events_spec.rb index 0edbffbcd3b..33940f70b1c 100644 --- a/spec/requests/projects/cycle_analytics_events_spec.rb +++ b/spec/requests/projects/cycle_analytics_events_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' -describe 'cycle analytics events' do - include ApiHelpers - +describe 'cycle analytics events', api: true do let(:user) { create(:user) } let(:project) { create(:project, :repository, public_builds: false) } let(:issue) { create(:issue, project: project, created_at: 2.days.ago) } -- cgit v1.2.1