summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/controllers/projects/services_controller.rb2
-rw-r--r--features/steps/project/services.rb2
-rw-r--r--spec/models/asana_service_spec.rb4
3 files changed, 6 insertions, 2 deletions
diff --git a/app/controllers/projects/services_controller.rb b/app/controllers/projects/services_controller.rb
index 5b35cc90413..b3110eacc18 100644
--- a/app/controllers/projects/services_controller.rb
+++ b/app/controllers/projects/services_controller.rb
@@ -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
diff --git a/features/steps/project/services.rb b/features/steps/project/services.rb
index 9e8b7cf1e89..957a16d06a8 100644
--- a/features/steps/project/services.rb
+++ b/features/steps/project/services.rb
@@ -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
diff --git a/spec/models/asana_service_spec.rb b/spec/models/asana_service_spec.rb
index 4d4968e80ff..d5d3d6c7c1c 100644
--- a/spec/models/asana_service_spec.rb
+++ b/spec/models/asana_service_spec.rb
@@ -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