Optimize generic specs for services

This commit is contained in:
Grzegorz Bizon 2017-09-05 10:04:40 +02:00
parent 6a4dd05190
commit d2e02224cb

View file

@ -1,10 +1,13 @@
require "spec_helper"
describe API::Services do
let(:user) { create(:user) }
let(:admin) { create(:admin) }
let(:user2) { create(:user) }
let(:project) { create(:project, creator_id: user.id, namespace: user.namespace) }
set(:user) { create(:user) }
set(:admin) { create(:admin) }
set(:user2) { create(:user) }
set(:project) do
create(:project, creator_id: user.id, namespace: user.namespace)
end
Service.available_services_names.each do |service|
describe "PUT /projects/:id/services/#{service.dasherize}" do
@ -98,8 +101,6 @@ describe API::Services do
end
describe 'POST /projects/:id/services/:slug/trigger' do
let!(:project) { create(:project) }
describe 'Mattermost Service' do
let(:service_name) { 'mattermost_slash_commands' }