Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ci/features/triggers_spec.rb')
-rw-r--r--spec/ci/features/triggers_spec.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/ci/features/triggers_spec.rb b/spec/ci/features/triggers_spec.rb
new file mode 100644
index 00000000000..2076429383d
--- /dev/null
+++ b/spec/ci/features/triggers_spec.rb
@@ -0,0 +1,26 @@
+require 'spec_helper'
+
+describe 'Variables' do
+ before do
+ login_as :user
+ @project = FactoryGirl.create :project
+ stub_js_gitlab_calls
+ visit project_triggers_path(@project)
+ end
+
+ context 'create a trigger' do
+ before do
+ click_on 'Add Trigger'
+ @project.triggers.count.should == 1
+ end
+
+ it 'contains trigger token' do
+ page.should have_content(@project.triggers.first.token)
+ end
+
+ it 'revokes the trigger' do
+ click_on 'Revoke'
+ @project.triggers.count.should == 0
+ end
+ end
+end