diff options
Diffstat (limited to 'spec/lib/gitlab')
-rw-r--r-- | spec/lib/gitlab/email/handler/create_note_handler_spec.rb | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/gitaly_client/notifications_spec.rb | 5 | ||||
-rw-r--r-- | spec/lib/gitlab/gitaly_client/ref_spec.rb | 15 | ||||
-rw-r--r-- | spec/lib/gitlab/quick_actions/command_definition_spec.rb (renamed from spec/lib/gitlab/slash_commands/command_definition_spec.rb) | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/quick_actions/dsl_spec.rb (renamed from spec/lib/gitlab/slash_commands/dsl_spec.rb) | 4 | ||||
-rw-r--r-- | spec/lib/gitlab/quick_actions/extractor_spec.rb (renamed from spec/lib/gitlab/slash_commands/extractor_spec.rb) | 4 | ||||
-rw-r--r-- | spec/lib/gitlab/slash_commands/command_spec.rb (renamed from spec/lib/gitlab/chat_commands/command_spec.rb) | 8 | ||||
-rw-r--r-- | spec/lib/gitlab/slash_commands/deploy_spec.rb (renamed from spec/lib/gitlab/chat_commands/deploy_spec.rb) | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/slash_commands/issue_new_spec.rb (renamed from spec/lib/gitlab/chat_commands/issue_new_spec.rb) | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/slash_commands/issue_search_spec.rb (renamed from spec/lib/gitlab/chat_commands/issue_search_spec.rb) | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/slash_commands/issue_show_spec.rb (renamed from spec/lib/gitlab/chat_commands/issue_show_spec.rb) | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/slash_commands/presenters/access_spec.rb (renamed from spec/lib/gitlab/chat_commands/presenters/access_spec.rb) | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/slash_commands/presenters/deploy_spec.rb (renamed from spec/lib/gitlab/chat_commands/presenters/deploy_spec.rb) | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/slash_commands/presenters/issue_new_spec.rb (renamed from spec/lib/gitlab/chat_commands/presenters/issue_new_spec.rb) | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/slash_commands/presenters/issue_search_spec.rb (renamed from spec/lib/gitlab/chat_commands/presenters/issue_search_spec.rb) | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/slash_commands/presenters/issue_show_spec.rb (renamed from spec/lib/gitlab/chat_commands/presenters/issue_show_spec.rb) | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/workhorse_spec.rb | 2 |
17 files changed, 33 insertions, 27 deletions
diff --git a/spec/lib/gitlab/email/handler/create_note_handler_spec.rb b/spec/lib/gitlab/email/handler/create_note_handler_spec.rb index 3f79eaf7afb..cd0309e248d 100644 --- a/spec/lib/gitlab/email/handler/create_note_handler_spec.rb +++ b/spec/lib/gitlab/email/handler/create_note_handler_spec.rb @@ -91,7 +91,7 @@ describe Gitlab::Email::Handler::CreateNoteHandler, lib: true do end end - context 'when the note contains slash commands' do + context 'when the note contains quick actions' do let!(:email_raw) { fixture_file("emails/commands_in_reply.eml") } context 'and current user cannot update noteable' do diff --git a/spec/lib/gitlab/gitaly_client/notifications_spec.rb b/spec/lib/gitlab/gitaly_client/notifications_spec.rb index b87dacb175b..e5c9e06a15e 100644 --- a/spec/lib/gitlab/gitaly_client/notifications_spec.rb +++ b/spec/lib/gitlab/gitaly_client/notifications_spec.rb @@ -3,12 +3,13 @@ require 'spec_helper' describe Gitlab::GitalyClient::Notifications do describe '#post_receive' do let(:project) { create(:empty_project) } - let(:repo_path) { project.repository.path_to_repo } + let(:storage_name) { project.repository_storage } + let(:relative_path) { project.path_with_namespace + '.git' } subject { described_class.new(project.repository) } it 'sends a post_receive message' do expect_any_instance_of(Gitaly::Notifications::Stub). - to receive(:post_receive).with(gitaly_request_with_repo_path(repo_path)) + to receive(:post_receive).with(gitaly_request_with_path(storage_name, relative_path)) subject.post_receive end diff --git a/spec/lib/gitlab/gitaly_client/ref_spec.rb b/spec/lib/gitlab/gitaly_client/ref_spec.rb index d8cd2dcbd2a..2ea44ef74b0 100644 --- a/spec/lib/gitlab/gitaly_client/ref_spec.rb +++ b/spec/lib/gitlab/gitaly_client/ref_spec.rb @@ -2,7 +2,8 @@ require 'spec_helper' describe Gitlab::GitalyClient::Ref do let(:project) { create(:empty_project) } - let(:repo_path) { project.repository.path_to_repo } + let(:storage_name) { project.repository_storage } + let(:relative_path) { project.path_with_namespace + '.git' } let(:client) { described_class.new(project.repository) } before do @@ -19,7 +20,8 @@ describe Gitlab::GitalyClient::Ref do describe '#branch_names' do it 'sends a find_all_branch_names message' do expect_any_instance_of(Gitaly::Ref::Stub). - to receive(:find_all_branch_names).with(gitaly_request_with_repo_path(repo_path)). + to receive(:find_all_branch_names). + with(gitaly_request_with_path(storage_name, relative_path)). and_return([]) client.branch_names @@ -29,7 +31,8 @@ describe Gitlab::GitalyClient::Ref do describe '#tag_names' do it 'sends a find_all_tag_names message' do expect_any_instance_of(Gitaly::Ref::Stub). - to receive(:find_all_tag_names).with(gitaly_request_with_repo_path(repo_path)). + to receive(:find_all_tag_names). + with(gitaly_request_with_path(storage_name, relative_path)). and_return([]) client.tag_names @@ -39,7 +42,8 @@ describe Gitlab::GitalyClient::Ref do describe '#default_branch_name' do it 'sends a find_default_branch_name message' do expect_any_instance_of(Gitaly::Ref::Stub). - to receive(:find_default_branch_name).with(gitaly_request_with_repo_path(repo_path)). + to receive(:find_default_branch_name). + with(gitaly_request_with_path(storage_name, relative_path)). and_return(double(name: 'foo')) client.default_branch_name @@ -49,7 +53,8 @@ describe Gitlab::GitalyClient::Ref do describe '#local_branches' do it 'sends a find_local_branches message' do expect_any_instance_of(Gitaly::Ref::Stub). - to receive(:find_local_branches).with(gitaly_request_with_repo_path(repo_path)). + to receive(:find_local_branches). + with(gitaly_request_with_path(storage_name, relative_path)). and_return([]) client.local_branches diff --git a/spec/lib/gitlab/slash_commands/command_definition_spec.rb b/spec/lib/gitlab/quick_actions/command_definition_spec.rb index 5b9173d3d3f..f44a562dc63 100644 --- a/spec/lib/gitlab/slash_commands/command_definition_spec.rb +++ b/spec/lib/gitlab/quick_actions/command_definition_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe Gitlab::SlashCommands::CommandDefinition do +describe Gitlab::QuickActions::CommandDefinition do subject { described_class.new(:command) } describe "#all_names" do diff --git a/spec/lib/gitlab/slash_commands/dsl_spec.rb b/spec/lib/gitlab/quick_actions/dsl_spec.rb index 33b49a5ddf9..a4bb3f911d7 100644 --- a/spec/lib/gitlab/slash_commands/dsl_spec.rb +++ b/spec/lib/gitlab/quick_actions/dsl_spec.rb @@ -1,9 +1,9 @@ require 'spec_helper' -describe Gitlab::SlashCommands::Dsl do +describe Gitlab::QuickActions::Dsl do before :all do DummyClass = Struct.new(:project) do - include Gitlab::SlashCommands::Dsl # rubocop:disable RSpec/DescribedClass + include Gitlab::QuickActions::Dsl # rubocop:disable RSpec/DescribedClass desc 'A command with no args' command :no_args, :none do diff --git a/spec/lib/gitlab/slash_commands/extractor_spec.rb b/spec/lib/gitlab/quick_actions/extractor_spec.rb index d7f77486b3e..9d32938e155 100644 --- a/spec/lib/gitlab/slash_commands/extractor_spec.rb +++ b/spec/lib/gitlab/quick_actions/extractor_spec.rb @@ -1,9 +1,9 @@ require 'spec_helper' -describe Gitlab::SlashCommands::Extractor do +describe Gitlab::QuickActions::Extractor do let(:definitions) do Class.new do - include Gitlab::SlashCommands::Dsl + include Gitlab::QuickActions::Dsl command(:reopen, :open) { } command(:assign) { } diff --git a/spec/lib/gitlab/chat_commands/command_spec.rb b/spec/lib/gitlab/slash_commands/command_spec.rb index 13e6953147b..28d7f9858c3 100644 --- a/spec/lib/gitlab/chat_commands/command_spec.rb +++ b/spec/lib/gitlab/slash_commands/command_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe Gitlab::ChatCommands::Command, service: true do +describe Gitlab::SlashCommands::Command, service: true do let(:project) { create(:empty_project) } let(:user) { create(:user) } @@ -93,19 +93,19 @@ describe Gitlab::ChatCommands::Command, service: true do context 'IssueShow is triggered' do let(:params) { { text: 'issue show 123' } } - it { is_expected.to eq(Gitlab::ChatCommands::IssueShow) } + it { is_expected.to eq(Gitlab::SlashCommands::IssueShow) } end context 'IssueCreate is triggered' do let(:params) { { text: 'issue create my title' } } - it { is_expected.to eq(Gitlab::ChatCommands::IssueNew) } + it { is_expected.to eq(Gitlab::SlashCommands::IssueNew) } end context 'IssueSearch is triggered' do let(:params) { { text: 'issue search my query' } } - it { is_expected.to eq(Gitlab::ChatCommands::IssueSearch) } + it { is_expected.to eq(Gitlab::SlashCommands::IssueSearch) } end end end diff --git a/spec/lib/gitlab/chat_commands/deploy_spec.rb b/spec/lib/gitlab/slash_commands/deploy_spec.rb index 46dbdeae37c..d919f7260db 100644 --- a/spec/lib/gitlab/chat_commands/deploy_spec.rb +++ b/spec/lib/gitlab/slash_commands/deploy_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe Gitlab::ChatCommands::Deploy, service: true do +describe Gitlab::SlashCommands::Deploy, service: true do describe '#execute' do let(:project) { create(:empty_project) } let(:user) { create(:user) } diff --git a/spec/lib/gitlab/chat_commands/issue_new_spec.rb b/spec/lib/gitlab/slash_commands/issue_new_spec.rb index 84c22328064..4de50d4a8bb 100644 --- a/spec/lib/gitlab/chat_commands/issue_new_spec.rb +++ b/spec/lib/gitlab/slash_commands/issue_new_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe Gitlab::ChatCommands::IssueNew, service: true do +describe Gitlab::SlashCommands::IssueNew, service: true do describe '#execute' do let(:project) { create(:empty_project) } let(:user) { create(:user) } diff --git a/spec/lib/gitlab/chat_commands/issue_search_spec.rb b/spec/lib/gitlab/slash_commands/issue_search_spec.rb index 551ccb79a58..06fff0afc50 100644 --- a/spec/lib/gitlab/chat_commands/issue_search_spec.rb +++ b/spec/lib/gitlab/slash_commands/issue_search_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe Gitlab::ChatCommands::IssueSearch, service: true do +describe Gitlab::SlashCommands::IssueSearch, service: true do describe '#execute' do let!(:issue) { create(:issue, project: project, title: 'find me') } let!(:confidential) { create(:issue, :confidential, project: project, title: 'mepmep find') } diff --git a/spec/lib/gitlab/chat_commands/issue_show_spec.rb b/spec/lib/gitlab/slash_commands/issue_show_spec.rb index 1f20d0a44ce..1899f664ccd 100644 --- a/spec/lib/gitlab/chat_commands/issue_show_spec.rb +++ b/spec/lib/gitlab/slash_commands/issue_show_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe Gitlab::ChatCommands::IssueShow, service: true do +describe Gitlab::SlashCommands::IssueShow, service: true do describe '#execute' do let(:issue) { create(:issue, project: project) } let(:project) { create(:empty_project) } diff --git a/spec/lib/gitlab/chat_commands/presenters/access_spec.rb b/spec/lib/gitlab/slash_commands/presenters/access_spec.rb index ae41d75ab0c..ef3d217f7be 100644 --- a/spec/lib/gitlab/chat_commands/presenters/access_spec.rb +++ b/spec/lib/gitlab/slash_commands/presenters/access_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe Gitlab::ChatCommands::Presenters::Access do +describe Gitlab::SlashCommands::Presenters::Access do describe '#access_denied' do subject { described_class.new.access_denied } diff --git a/spec/lib/gitlab/chat_commands/presenters/deploy_spec.rb b/spec/lib/gitlab/slash_commands/presenters/deploy_spec.rb index dc2dd300072..dee3c77db27 100644 --- a/spec/lib/gitlab/chat_commands/presenters/deploy_spec.rb +++ b/spec/lib/gitlab/slash_commands/presenters/deploy_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe Gitlab::ChatCommands::Presenters::Deploy do +describe Gitlab::SlashCommands::Presenters::Deploy do let(:build) { create(:ci_build) } describe '#present' do diff --git a/spec/lib/gitlab/chat_commands/presenters/issue_new_spec.rb b/spec/lib/gitlab/slash_commands/presenters/issue_new_spec.rb index 17fcdbc2452..7f81ebb47db 100644 --- a/spec/lib/gitlab/chat_commands/presenters/issue_new_spec.rb +++ b/spec/lib/gitlab/slash_commands/presenters/issue_new_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe Gitlab::ChatCommands::Presenters::IssueNew do +describe Gitlab::SlashCommands::Presenters::IssueNew do let(:project) { create(:empty_project) } let(:issue) { create(:issue, project: project) } let(:attachment) { subject[:attachments].first } diff --git a/spec/lib/gitlab/chat_commands/presenters/issue_search_spec.rb b/spec/lib/gitlab/slash_commands/presenters/issue_search_spec.rb index 3799a324db4..7e57a0addcb 100644 --- a/spec/lib/gitlab/chat_commands/presenters/issue_search_spec.rb +++ b/spec/lib/gitlab/slash_commands/presenters/issue_search_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe Gitlab::ChatCommands::Presenters::IssueSearch do +describe Gitlab::SlashCommands::Presenters::IssueSearch do let(:project) { create(:empty_project) } let(:message) { subject[:text] } diff --git a/spec/lib/gitlab/chat_commands/presenters/issue_show_spec.rb b/spec/lib/gitlab/slash_commands/presenters/issue_show_spec.rb index 3916fc704a4..2a6ed860737 100644 --- a/spec/lib/gitlab/chat_commands/presenters/issue_show_spec.rb +++ b/spec/lib/gitlab/slash_commands/presenters/issue_show_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe Gitlab::ChatCommands::Presenters::IssueShow do +describe Gitlab::SlashCommands::Presenters::IssueShow do let(:project) { create(:empty_project) } let(:issue) { create(:issue, project: project) } let(:attachment) { subject[:attachments].first } diff --git a/spec/lib/gitlab/workhorse_spec.rb b/spec/lib/gitlab/workhorse_spec.rb index b1999409170..ad19998dff4 100644 --- a/spec/lib/gitlab/workhorse_spec.rb +++ b/spec/lib/gitlab/workhorse_spec.rb @@ -212,7 +212,7 @@ describe Gitlab::Workhorse, lib: true do it 'includes a Repository param' do repo_param = { Repository: { - path: repo_path, + path: '', # deprecated field; grpc automatically creates it anyway storage_name: 'default', relative_path: project.full_path + '.git' } } |