BigW Consortium Gitlab

Commit 3cd1eda5 by Jeremy

Add restrict_to_branch to service controller

And add restrict_to_branch to spec
parent b4d9ceb2
......@@ -47,7 +47,7 @@ class Projects::ServicesController < Projects::ApplicationController
:room, :recipients, :project_url, :webhook,
:user_key, :device, :priority, :sound, :bamboo_url, :username, :password,
:build_key, :server, :teamcity_url, :build_type,
:description, :issues_url, :new_issue_url
:description, :issues_url, :new_issue_url, :restrict_to_branch
)
end
end
......@@ -110,11 +110,13 @@ class Spinach::Features::ProjectServices < Spinach::FeatureSteps
step 'I fill Asana settings' do
check 'Active'
fill_in 'Api key', with: 'verySecret'
fill_in 'Restrict to branch', with: 'master'
click_button 'Save'
end
step 'I should see Asana service settings saved' do
find_field('Api key').value.should == 'verySecret'
find_field('Restrict to branch').value.should == 'master'
end
step 'I click email on push service link' do
......
......@@ -27,6 +27,7 @@ describe AsanaService, models: true do
end
it { should validate_presence_of :api_key }
it { should validate_presence_of :restrict_to_branch }
end
end
......@@ -40,7 +41,8 @@ describe AsanaService, models: true do
project: project,
project_id: project.id,
service_hook: true,
api_key: 'verySecret'
api_key: 'verySecret',
restrict_to_branch: 'master'
)
end
......
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