From d037a2e998b807d01585a48af90a3b3182eeebc5 Mon Sep 17 00:00:00 2001 From: Filipa Lacerda Date: Tue, 4 Apr 2017 09:14:46 +0100 Subject: Fix typo Adds tests --- spec/factories/ci/builds.rb | 5 +++++ spec/factories/environments.rb | 5 +++++ 2 files changed, 10 insertions(+) (limited to 'spec/factories') diff --git a/spec/factories/ci/builds.rb b/spec/factories/ci/builds.rb index f78086211f7..87a0c95c4dc 100644 --- a/spec/factories/ci/builds.rb +++ b/spec/factories/ci/builds.rb @@ -192,5 +192,10 @@ FactoryGirl.define do trait :no_options do options { {} } end + + trait :non_playable do + status 'created' + self.when 'manual' + end end end diff --git a/spec/factories/environments.rb b/spec/factories/environments.rb index 0852dda6b29..3fbf24b5c7d 100644 --- a/spec/factories/environments.rb +++ b/spec/factories/environments.rb @@ -32,5 +32,10 @@ FactoryGirl.define do environment.update_attribute(:deployments, [deployment]) end end + + trait :non_playable do + status 'created' + self.when 'manual' + end end end -- cgit v1.2.1 From 4865a7ab92bd74f6376d50be4dd3b2e3937c5841 Mon Sep 17 00:00:00 2001 From: Mark Fletcher Date: Wed, 5 Apr 2017 16:22:28 +1000 Subject: Enable creation of deploy keys with write access via the API * Documentation was incorrectly advertising the missing param --- spec/factories/keys.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'spec/factories') diff --git a/spec/factories/keys.rb b/spec/factories/keys.rb index dd93b439b2b..4e140102492 100644 --- a/spec/factories/keys.rb +++ b/spec/factories/keys.rb @@ -23,5 +23,9 @@ FactoryGirl.define do factory :another_deploy_key, class: 'DeployKey' do end end + + factory :write_access_key, class: 'DeployKey' do + can_push true + end end end -- cgit v1.2.1