Commit d2e02224 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Optimize generic specs for services

parent 6a4dd051
require "spec_helper" require "spec_helper"
describe API::Services do describe API::Services do
let(:user) { create(:user) } set(:user) { create(:user) }
let(:admin) { create(:admin) } set(:admin) { create(:admin) }
let(:user2) { create(:user) } set(:user2) { create(:user) }
let(:project) { create(:project, creator_id: user.id, namespace: user.namespace) }
set(:project) do
create(:project, creator_id: user.id, namespace: user.namespace)
end
Service.available_services_names.each do |service| Service.available_services_names.each do |service|
describe "PUT /projects/:id/services/#{service.dasherize}" do describe "PUT /projects/:id/services/#{service.dasherize}" do
...@@ -98,8 +101,6 @@ describe API::Services do ...@@ -98,8 +101,6 @@ describe API::Services do
end end
describe 'POST /projects/:id/services/:slug/trigger' do describe 'POST /projects/:id/services/:slug/trigger' do
let!(:project) { create(:project) }
describe 'Mattermost Service' do describe 'Mattermost Service' do
let(:service_name) { 'mattermost_slash_commands' } let(:service_name) { 'mattermost_slash_commands' }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment