diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-11-18 18:16:45 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-11-18 19:27:14 +0300 |
commit | 1db1896ed2375481d53f74f7900d259fe068ef64 (patch) | |
tree | ec82ca5c9ba8da236aa78a207c7926dcf3ef5fe4 /spec | |
parent | c72c76fde3882b7c2f778bf85132cd2c80f01f5b (diff) |
Rename mattermost_command to mattermost_slash_commands
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/import_export/all_models.yml | 2 | ||||
-rw-r--r-- | spec/models/project_services/mattermost_slash_commands_service_spec.rb (renamed from spec/models/project_services/mattermost_command_service_spec.rb) | 6 | ||||
-rw-r--r-- | spec/models/project_spec.rb | 2 | ||||
-rw-r--r-- | spec/requests/api/services_spec.rb | 12 |
4 files changed, 11 insertions, 11 deletions
diff --git a/spec/lib/gitlab/import_export/all_models.yml b/spec/lib/gitlab/import_export/all_models.yml index bc837299b9e..fe3c39e38db 100644 --- a/spec/lib/gitlab/import_export/all_models.yml +++ b/spec/lib/gitlab/import_export/all_models.yml @@ -128,7 +128,7 @@ project: - emails_on_push_service - builds_email_service - pipelines_email_service -- mattermost_command_service +- mattermost_slash_commands_service - irker_service - pivotaltracker_service - hipchat_service diff --git a/spec/models/project_services/mattermost_command_service_spec.rb b/spec/models/project_services/mattermost_slash_commands_service_spec.rb index 21bf1d35e3f..4a1037e950b 100644 --- a/spec/models/project_services/mattermost_command_service_spec.rb +++ b/spec/models/project_services/mattermost_slash_commands_service_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe MattermostCommandService, models: true do +describe MattermostSlashCommandsService, models: true do describe "Associations" do it { is_expected.to respond_to :token } end @@ -66,7 +66,7 @@ describe MattermostCommandService, models: true do end let(:service) do - project.create_mattermost_command_service( + project.create_mattermost_slash_commands_service( properties: { token: 'token' } ) end @@ -82,7 +82,7 @@ describe MattermostCommandService, models: true do context 'when the user is authenticated' do let!(:chat_name) { create(:chat_name, service: service) } let(:service) do - project.create_mattermost_command_service( + project.create_mattermost_slash_commands_service( properties: { token: 'token' } ) end diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index 1972a8bb3f4..42589858ab1 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -36,7 +36,7 @@ describe Project, models: true do it { is_expected.to have_one(:hipchat_service).dependent(:destroy) } it { is_expected.to have_one(:flowdock_service).dependent(:destroy) } it { is_expected.to have_one(:assembla_service).dependent(:destroy) } - it { is_expected.to have_one(:mattermost_command_service).dependent(:destroy) } + it { is_expected.to have_one(:mattermost_slash_commands_service).dependent(:destroy) } it { is_expected.to have_one(:gemnasium_service).dependent(:destroy) } it { is_expected.to have_one(:buildkite_service).dependent(:destroy) } it { is_expected.to have_one(:bamboo_service).dependent(:destroy) } diff --git a/spec/requests/api/services_spec.rb b/spec/requests/api/services_spec.rb index 782d76db318..ce9c96ace21 100644 --- a/spec/requests/api/services_spec.rb +++ b/spec/requests/api/services_spec.rb @@ -91,7 +91,7 @@ describe API::API, api: true do describe 'POST /projects/:id/services/:slug/trigger' do let!(:project) { create(:empty_project) } - let(:service_name) { 'mattermost_command' } + let(:service_name) { 'mattermost_slash_commands' } context 'no service is available' do it 'returns a not found message' do @@ -107,14 +107,14 @@ describe API::API, api: true do context 'the service is not active' do let!(:inactive_service) do - project.create_mattermost_command_service( + project.create_mattermost_slash_commands_service( active: false, properties: { token: 'token' } ) end it 'when the service is inactive' do - post api("/projects/#{project.id}/services/mattermost_command/trigger") + post api("/projects/#{project.id}/services/mattermost_slash_commands/trigger") expect(response).to have_http_status(404) end @@ -122,14 +122,14 @@ describe API::API, api: true do context 'the service is active' do let!(:active_service) do - project.create_mattermost_command_service( + project.create_mattermost_slash_commands_service( active: true, properties: { token: 'token' } ) end it 'retusn status 200' do - post api("/projects/#{project.id}/services/mattermost_command/trigger"), params + post api("/projects/#{project.id}/services/mattermost_slash_commands/trigger"), params expect(response).to have_http_status(200) end @@ -137,7 +137,7 @@ describe API::API, api: true do context 'when the project can not be found' do it 'returns a generic 404' do - post api("/projects/404/services/mattermost_command/trigger"), params + post api("/projects/404/services/mattermost_slash_commands/trigger"), params expect(response).to have_http_status(404) expect(json_response["message"]).to eq("404 Service Not Found") |