summaryrefslogtreecommitdiff
path: root/spec/requests/api/triggers_spec.rb
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-08-24 21:50:05 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-08-25 19:53:58 +0800
commit2d4744c34c947d98a8c6f88c4a66eefbc7e8bb4c (patch)
tree685898bda06c92b153ea580838af2235d68fc8f8 /spec/requests/api/triggers_spec.rb
parentc1f12ff58e8d66daaa1b2dd86259793751a89d69 (diff)
downloadgitlab-ce-2d4744c34c947d98a8c6f88c4a66eefbc7e8bb4c.tar.gz
Make default trigger factory generate an owner
And specify owners more clearly
Diffstat (limited to 'spec/requests/api/triggers_spec.rb')
-rw-r--r--spec/requests/api/triggers_spec.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/spec/requests/api/triggers_spec.rb b/spec/requests/api/triggers_spec.rb
index 572e9a0fd07..9a98e217643 100644
--- a/spec/requests/api/triggers_spec.rb
+++ b/spec/requests/api/triggers_spec.rb
@@ -8,8 +8,8 @@ describe API::Triggers do
let!(:project) { create(:project, :repository, creator: user) }
let!(:master) { create(:project_member, :master, user: user, project: project) }
let!(:developer) { create(:project_member, :developer, user: user2, project: project) }
- let!(:trigger) { create(:ci_trigger, project: project, token: trigger_token) }
- let!(:trigger2) { create(:ci_trigger, project: project, token: trigger_token_2) }
+ let!(:trigger) { create(:ci_trigger, project: project, token: trigger_token, owner: user) }
+ let!(:trigger2) { create(:ci_trigger, project: project, token: trigger_token_2, owner: user2) }
let!(:trigger_request) { create(:ci_trigger_request, trigger: trigger, created_at: '2015-01-01 12:13:14') }
describe 'POST /projects/:project_id/trigger/pipeline' do
@@ -254,8 +254,6 @@ describe API::Triggers do
describe 'POST /projects/:id/triggers/:trigger_id/take_ownership' do
context 'authenticated user with valid permissions' do
it 'updates owner' do
- expect(trigger.owner).to be_nil
-
post api("/projects/#{project.id}/triggers/#{trigger.id}/take_ownership", user)
expect(response).to have_http_status(200)