diff options
Diffstat (limited to 'spec/requests')
-rw-r--r-- | spec/requests/api/award_emoji_spec.rb | 1 | ||||
-rw-r--r-- | spec/requests/api/boards_spec.rb | 1 | ||||
-rw-r--r-- | spec/requests/api/graphql/mutations/award_emojis/add_spec.rb | 1 | ||||
-rw-r--r-- | spec/requests/api/graphql/mutations/award_emojis/toggle_spec.rb | 1 | ||||
-rw-r--r-- | spec/requests/api/project_import_spec.rb | 1 | ||||
-rw-r--r-- | spec/requests/api/projects_spec.rb | 3 | ||||
-rw-r--r-- | spec/requests/api/settings_spec.rb | 1 | ||||
-rw-r--r-- | spec/requests/api/snippets_spec.rb | 1 | ||||
-rw-r--r-- | spec/requests/api/users_spec.rb | 1 | ||||
-rw-r--r-- | spec/requests/git_http_spec.rb | 4 |
10 files changed, 12 insertions, 3 deletions
diff --git a/spec/requests/api/award_emoji_spec.rb b/spec/requests/api/award_emoji_spec.rb index 80040cddd4d..19a34314bb8 100644 --- a/spec/requests/api/award_emoji_spec.rb +++ b/spec/requests/api/award_emoji_spec.rb @@ -9,6 +9,7 @@ describe API::AwardEmoji do set(:award_emoji) { create(:award_emoji, awardable: issue, user: user) } let!(:merge_request) { create(:merge_request, source_project: project, target_project: project) } let!(:downvote) { create(:award_emoji, :downvote, awardable: merge_request, user: user) } + set(:note) { create(:note, project: project, noteable: issue) } before do diff --git a/spec/requests/api/boards_spec.rb b/spec/requests/api/boards_spec.rb index 8a67e956165..510ef9d7d0a 100644 --- a/spec/requests/api/boards_spec.rb +++ b/spec/requests/api/boards_spec.rb @@ -69,6 +69,7 @@ describe API::Boards do set(:group) { create(:group) } set(:board_parent) { create(:group, parent: group ) } let(:url) { "/groups/#{board_parent.id}/boards/#{board.id}/lists" } + set(:board) { create(:board, group: board_parent) } it 'creates a new board list for ancestor group labels' do diff --git a/spec/requests/api/graphql/mutations/award_emojis/add_spec.rb b/spec/requests/api/graphql/mutations/award_emojis/add_spec.rb index 5b910d5bfe0..b24981873c8 100644 --- a/spec/requests/api/graphql/mutations/award_emojis/add_spec.rb +++ b/spec/requests/api/graphql/mutations/award_emojis/add_spec.rb @@ -75,6 +75,7 @@ describe 'Adding an AwardEmoji' do describe 'marking Todos as done' do let(:user) { current_user} + subject { post_graphql_mutation(mutation, current_user: user) } include_examples 'creating award emojis marks Todos as done' diff --git a/spec/requests/api/graphql/mutations/award_emojis/toggle_spec.rb b/spec/requests/api/graphql/mutations/award_emojis/toggle_spec.rb index ae628d3e56c..5e2c0e668a5 100644 --- a/spec/requests/api/graphql/mutations/award_emojis/toggle_spec.rb +++ b/spec/requests/api/graphql/mutations/award_emojis/toggle_spec.rb @@ -83,6 +83,7 @@ describe 'Toggling an AwardEmoji' do describe 'marking Todos as done' do let(:user) { current_user} + subject { post_graphql_mutation(mutation, current_user: user) } include_examples 'creating award emojis marks Todos as done' diff --git a/spec/requests/api/project_import_spec.rb b/spec/requests/api/project_import_spec.rb index 866adbd424e..186f0f52a46 100644 --- a/spec/requests/api/project_import_spec.rb +++ b/spec/requests/api/project_import_spec.rb @@ -7,6 +7,7 @@ describe API::ProjectImport do let(:user) { create(:user) } let(:file) { File.join('spec', 'features', 'projects', 'import_export', 'test_project_export.tar.gz') } let(:namespace) { create(:group) } + before do allow_any_instance_of(Gitlab::ImportExport).to receive(:storage_path).and_return(export_path) stub_uploads_object_storage(FileUploader) diff --git a/spec/requests/api/projects_spec.rb b/spec/requests/api/projects_spec.rb index cda2dd7d2f4..eb3d5e698d8 100644 --- a/spec/requests/api/projects_spec.rb +++ b/spec/requests/api/projects_spec.rb @@ -715,7 +715,7 @@ describe API::Projects do post api('/projects', user), params: project - expect(json_response['readme_url']).to eql("#{Gitlab.config.gitlab.url}/#{json_response['namespace']['full_path']}/somewhere/blob/master/README.md") + expect(json_response['readme_url']).to eql("#{Gitlab.config.gitlab.url}/#{json_response['namespace']['full_path']}/somewhere/-/blob/master/README.md") end it 'sets tag list to a project' do @@ -1882,6 +1882,7 @@ describe API::Projects do describe "POST /projects/:id/share" do let(:group) { create(:group) } + before do group.add_developer(user) end diff --git a/spec/requests/api/settings_spec.rb b/spec/requests/api/settings_spec.rb index 6599e4b8f23..af86ba86303 100644 --- a/spec/requests/api/settings_spec.rb +++ b/spec/requests/api/settings_spec.rb @@ -4,6 +4,7 @@ require 'spec_helper' describe API::Settings, 'Settings' do let(:user) { create(:user) } + set(:admin) { create(:admin) } describe "GET /application/settings" do diff --git a/spec/requests/api/snippets_spec.rb b/spec/requests/api/snippets_spec.rb index eb9d0d38bcb..f32be7a8765 100644 --- a/spec/requests/api/snippets_spec.rb +++ b/spec/requests/api/snippets_spec.rb @@ -375,6 +375,7 @@ describe API::Snippets do describe 'DELETE /snippets/:id' do let!(:public_snippet) { create(:personal_snippet, :public, author: user) } + it 'deletes snippet' do expect do delete api("/snippets/#{public_snippet.id}", user) diff --git a/spec/requests/api/users_spec.rb b/spec/requests/api/users_spec.rb index 29088a42fbe..0a22a09b8a6 100644 --- a/spec/requests/api/users_spec.rb +++ b/spec/requests/api/users_spec.rb @@ -2124,6 +2124,7 @@ describe API::Users do describe 'GET /user/status' do let(:path) { '/user/status' } + it_behaves_like 'rendering user status' end diff --git a/spec/requests/git_http_spec.rb b/spec/requests/git_http_spec.rb index 42b4bd71b88..7424b7ee8d0 100644 --- a/spec/requests/git_http_spec.rb +++ b/spec/requests/git_http_spec.rb @@ -834,7 +834,7 @@ describe 'Git HTTP requests' do Blob.decorate(Gitlab::Git::Blob.find(project.repository, 'master', 'bar/branch-test.txt'), project) end - get "/#{project.full_path}/blob/master/info/refs" + get "/#{project.full_path}/-/blob/master/info/refs" end it "returns the file" do @@ -844,7 +844,7 @@ describe 'Git HTTP requests' do context "when the file does not exist" do before do - get "/#{project.full_path}/blob/master/info/refs" + get "/#{project.full_path}/-/blob/master/info/refs" end it "redirects" do |