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
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-06-01 13:29:11 +0300
committerLin Jen-Shin <godfat@godfat.org>2017-06-01 13:29:11 +0300
commit4f8a1c0d4cc9372823cb28a16936c49dd4f09402 (patch)
tree55ecd7123d35b302ad2f258bd891c0ef08e4fe30 /spec/models/ci
parent20dcd522f0a3cf2603047bcd296eae254487fa5a (diff)
Just use the url from options, not saving it as a column
Diffstat (limited to 'spec/models/ci')
-rw-r--r--spec/models/ci/build_spec.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb
index 2df439819ef..141a2741ced 100644
--- a/spec/models/ci/build_spec.rb
+++ b/spec/models/ci/build_spec.rb
@@ -20,7 +20,6 @@ describe Ci::Build, :models do
it { is_expected.to validate_presence_of(:ref) }
it { is_expected.to respond_to(:has_trace?) }
it { is_expected.to respond_to(:trace) }
- it { is_expected.to validate_length_of(:environment_url).is_at_most(255) }
describe '#actionize' do
context 'when build is a created' do
@@ -435,7 +434,7 @@ describe Ci::Build, :models do
let(:build) do
create(:ci_build,
ref: 'master',
- environment_url: 'http://review/$CI_COMMIT_REF_NAME')
+ options: { environment: { url: 'http://review/$CI_COMMIT_REF_NAME' } })
end
it { is_expected.to eq('http://review/master') }
@@ -445,7 +444,7 @@ describe Ci::Build, :models do
let(:build) do
create(:ci_build,
yaml_variables: [{ key: :APP_HOST, value: 'host' }],
- environment_url: 'http://review/$APP_HOST')
+ options: { environment: { url: 'http://review/$APP_HOST' } })
end
it { is_expected.to eq('http://review/host') }
@@ -1244,7 +1243,7 @@ describe Ci::Build, :models do
context 'when the URL was set from the job' do
before do
- build.update(environment_url: 'http://host/$CI_JOB_NAME')
+ build.update(options: { environment: { url: 'http://host/$CI_JOB_NAME' } })
end
it_behaves_like 'containing environment variables'