Add restrict_to_branch to service controller
And add restrict_to_branch to spec
This commit is contained in:
parent
b4d9ceb26f
commit
3cd1eda5a4
3 changed files with 6 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue