Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
authorZ.J. van de Weg <git@zjvandeweg.nl>2016-11-18 13:38:54 +0300
committerZ.J. van de Weg <git@zjvandeweg.nl>2016-11-18 13:38:54 +0300
commitf749fb7fe0574d07eeb38561b9af62754e518281 (patch)
treee8647693e60b73f12cd3b9dca0efb0aec1796fcb /spec/lib
parentb8607576c1bb25fe2cbb575b48becdf7bd4aaa8c (diff)
Improve style, add more tests
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/gitlab/chat_commands/command_spec.rb6
-rw-r--r--spec/lib/gitlab/chat_commands/issue_create_spec.rb2
-rw-r--r--spec/lib/gitlab/import_export/all_models.yml4
3 files changed, 9 insertions, 3 deletions
diff --git a/spec/lib/gitlab/chat_commands/command_spec.rb b/spec/lib/gitlab/chat_commands/command_spec.rb
index 11b607a6843..f44c848479e 100644
--- a/spec/lib/gitlab/chat_commands/command_spec.rb
+++ b/spec/lib/gitlab/chat_commands/command_spec.rb
@@ -7,7 +7,7 @@ describe Gitlab::ChatCommands::Command, service: true do
subject { described_class.new(project, user, params).execute }
describe '#execute' do
- context 'when no command is not available' do
+ context 'when no command is available' do
let(:params) { { text: 'issue show 1' } }
let(:project) { create(:project, has_external_issue_tracker: true) }
@@ -45,6 +45,10 @@ describe Gitlab::ChatCommands::Command, service: true do
it 'presents the issue' do
expect(subject[:text]).to match("my new issue")
end
+
+ it 'shows a link to the new issue' do
+ expect(subject[:text]).to match(/\/issues\/\d+/)
+ end
end
end
end
diff --git a/spec/lib/gitlab/chat_commands/issue_create_spec.rb b/spec/lib/gitlab/chat_commands/issue_create_spec.rb
index 4831f24efed..df0c317ccea 100644
--- a/spec/lib/gitlab/chat_commands/issue_create_spec.rb
+++ b/spec/lib/gitlab/chat_commands/issue_create_spec.rb
@@ -34,7 +34,7 @@ describe Gitlab::ChatCommands::IssueCreate, service: true do
end
end
- describe 'self.match' do
+ describe '.match' do
it 'matches the title without description' do
match = described_class.match("issue create my title")
diff --git a/spec/lib/gitlab/import_export/all_models.yml b/spec/lib/gitlab/import_export/all_models.yml
index 02b11bd999a..bc837299b9e 100644
--- a/spec/lib/gitlab/import_export/all_models.yml
+++ b/spec/lib/gitlab/import_export/all_models.yml
@@ -116,6 +116,7 @@ project:
- base_tags
- tag_taggings
- tags
+- chat_services
- creator
- group
- namespace
@@ -127,6 +128,7 @@ project:
- emails_on_push_service
- builds_email_service
- pipelines_email_service
+- mattermost_command_service
- irker_service
- pivotaltracker_service
- hipchat_service
@@ -188,4 +190,4 @@ award_emoji:
- awardable
- user
priorities:
-- label \ No newline at end of file
+- label