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
path: root/spec
diff options
context:
space:
mode:
authorZ.J. van de Weg <git@zjvandeweg.nl>2017-05-08 22:56:37 +0300
committerZ.J. van de Weg <git@zjvandeweg.nl>2017-05-11 15:52:47 +0300
commitd922f54548ee64ff8cffb7234f574333d4edd2b7 (patch)
tree655611d1172faf7dc1da90d49b5e88e51414b2e7 /spec
parent3eb8435fec3cd7311544a256a3205f31d1dc3a0c (diff)
Remove rails dependent: :destroy statement
Enforced by the database, and no callbacks need to be called. Combined with 7b9b2c6099 and 294a8b8a6d this resolves gitlab-org/gitlab-ce#31799
Diffstat (limited to 'spec')
-rw-r--r--spec/factories/ci/variables.rb2
-rw-r--r--spec/models/ci/variable_spec.rb2
2 files changed, 3 insertions, 1 deletions
diff --git a/spec/factories/ci/variables.rb b/spec/factories/ci/variables.rb
index 6653f0bb5c3..c5fba597c1c 100644
--- a/spec/factories/ci/variables.rb
+++ b/spec/factories/ci/variables.rb
@@ -2,5 +2,7 @@ FactoryGirl.define do
factory :ci_variable, class: Ci::Variable do
sequence(:key) { |n| "VARIABLE_#{n}" }
value 'VARIABLE_VALUE'
+
+ project factory: :empty_project
end
end
diff --git a/spec/models/ci/variable_spec.rb b/spec/models/ci/variable_spec.rb
index 048d25869bc..fe8c52d5353 100644
--- a/spec/models/ci/variable_spec.rb
+++ b/spec/models/ci/variable_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe Ci::Variable, models: true do
- subject { Ci::Variable.new }
+ subject { build(:ci_variable) }
let(:secret_value) { 'secret' }