diff options
author | Z.J. van de Weg <git@zjvandeweg.nl> | 2016-12-20 22:56:46 +0300 |
---|---|---|
committer | Z.J. van de Weg <git@zjvandeweg.nl> | 2016-12-20 22:57:09 +0300 |
commit | 4a03fae930a58b485ee610ce9e6058a2c2dd3d6e (patch) | |
tree | 418163b6578935b3660de4da67ab0e946f80acf6 /spec/features/projects/services | |
parent | 0bd8669f3a606479e3f97683e0bfb178856df422 (diff) |
Fix rspec tests due to different API
[ci skip]
Diffstat (limited to 'spec/features/projects/services')
-rw-r--r-- | spec/features/projects/services/mattermost_slash_command_spec.rb | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/spec/features/projects/services/mattermost_slash_command_spec.rb b/spec/features/projects/services/mattermost_slash_command_spec.rb index 73ecf86aded..274d50e7ce4 100644 --- a/spec/features/projects/services/mattermost_slash_command_spec.rb +++ b/spec/features/projects/services/mattermost_slash_command_spec.rb @@ -4,10 +4,12 @@ feature 'Setup Mattermost slash commands', feature: true do include WaitForAjax let(:user) { create(:user) } - let(:project) { create(:project) } + let(:project) { create(:empty_project) } let(:service) { project.create_mattermost_slash_commands_service } + let(:mattermost_enabled) { true } before do + Settings.mattermost['enabled'] = mattermost_enabled project.team << [user, :master] login_as(user) visit edit_namespace_project_service_path(project.namespace, project, service) @@ -32,19 +34,13 @@ feature 'Setup Mattermost slash commands', feature: true do end describe 'mattermost service is enabled' do - before do - allow(Gitlab.config.mattermost).to receive(:enabled).and_return(true) - 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 - allow(Gitlab.config.mattermost).to receive(:enabled).and_return(false) - end + let(:mattermost_enabled) { false } it 'shows the correct trigger url' do value = find_field('request_url').value |