debian-mirror-gitlab/spec/features/triggers_spec.rb

29 lines
645 B
Ruby
Raw Normal View History

2015-09-25 12:07:36 +05:30
require 'spec_helper'
describe 'Triggers' do
2015-10-24 18:46:33 +05:30
let(:user) { create(:user) }
before { login_as(user) }
2015-09-25 12:07:36 +05:30
before do
2015-12-23 02:04:40 +05:30
@project = FactoryGirl.create :empty_project
@project.team << [user, :master]
visit namespace_project_triggers_path(@project.namespace, @project)
2015-09-25 12:07:36 +05:30
end
context 'create a trigger' do
before do
click_on 'Add Trigger'
expect(@project.triggers.count).to eq(1)
end
it 'contains trigger token' do
expect(page).to have_content(@project.triggers.first.token)
end
it 'revokes the trigger' do
click_on 'Revoke'
expect(@project.triggers.count).to eq(0)
end
end
end