summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke "Jared" Bennett <lbennett@gitlab.com>2016-12-20 13:53:24 +0000
committerLuke "Jared" Bennett <lbennett@gitlab.com>2016-12-20 13:53:24 +0000
commitccfbbf7dfac61557159d743b776f145fe380527a (patch)
tree77e70c69c0f86b4d45efa711fda25b83ff08ffdd
parentf7b7e918fef6567d26e7fe17894e5df14c58f37c (diff)
downloadgitlab-ce-ccfbbf7dfac61557159d743b776f145fe380527a.tar.gz
Fix tests
-rw-r--r--spec/features/projects/services/mattermost_slash_command_spec.rb40
1 files changed, 5 insertions, 35 deletions
diff --git a/spec/features/projects/services/mattermost_slash_command_spec.rb b/spec/features/projects/services/mattermost_slash_command_spec.rb
index 4c08d1e6e65..521eedeae9e 100644
--- a/spec/features/projects/services/mattermost_slash_command_spec.rb
+++ b/spec/features/projects/services/mattermost_slash_command_spec.rb
@@ -32,49 +32,19 @@ feature 'Setup Mattermost slash commands', feature: true do
end
describe 'mattermost service is enabled' do
- let(:info) { find('.services-installation-info') }
-
before do
- Gitlab.config.mattermost.enabled = true
- end
-
- it 'shows the correct mattermost url' do
- expect(page).to have_content Gitlab.config.mattermost.host
- end
-
- describe 'mattermost service is active' do
- before do
- service.active = true
- end
-
- it 'shows that mattermost is active' do
- expect(info).to have_content 'Installed'
- expect(info).not_to have_content 'Not installed'
- end
-
- it 'shows the edit mattermost button' do
- expect(info).to have_button 'Edit Mattermost'
- end
+ allow(Gitlab.config.mattermost).to receive(:enabled).and_return(true)
end
- describe 'mattermost service is not active' do
- before do
- service.active = false
- end
-
- it 'shows that mattermost is not active' do
- expect(info).to have_content 'Not installed'
- end
-
- it 'shows the add to mattermost button' do
- expect(info).to have_button 'Add to Mattermost'
- end
+ it 'shows the add to mattermost button' do
+ expect(page).to have_link 'Add to Mattermost'
end
end
+
describe 'mattermost service is not enabled' do
before do
- Gitlab.config.mattermost.enabled = false
+ allow(Gitlab.config.mattermost).to receive(:enabled).and_return(false)
end
it 'shows the correct trigger url' do