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:
Diffstat (limited to 'spec/models/integrations/field_spec.rb')
-rw-r--r--spec/models/integrations/field_spec.rb16
1 files changed, 3 insertions, 13 deletions
diff --git a/spec/models/integrations/field_spec.rb b/spec/models/integrations/field_spec.rb
index c30f9ef0d7b..ca71dd0e6d3 100644
--- a/spec/models/integrations/field_spec.rb
+++ b/spec/models/integrations/field_spec.rb
@@ -15,8 +15,8 @@ RSpec.describe ::Integrations::Field do
end
describe '#initialize' do
- it 'sets type password for secret names' do
- attrs[:name] = 'token'
+ it 'sets type password for secret fields' do
+ attrs[:is_secret] = true
attrs[:type] = 'text'
expect(field[:type]).to eq('password')
@@ -84,7 +84,7 @@ RSpec.describe ::Integrations::Field do
when :type
eq 'text'
when :is_secret
- eq true
+ eq false
else
be_nil
end
@@ -175,16 +175,6 @@ RSpec.describe ::Integrations::Field do
it { is_expected.to be_secret }
end
- %w[token api_token api_key secret_key secret_sauce password passphrase].each do |name|
- context "when named #{name}" do
- before do
- attrs[:name] = name
- end
-
- it { is_expected.to be_secret }
- end
- end
-
context "when named url" do
before do
attrs[:name] = :url