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, 16 insertions, 0 deletions
diff --git a/spec/models/integrations/field_spec.rb b/spec/models/integrations/field_spec.rb
index 49eaecd1b2e..22ad71135e7 100644
--- a/spec/models/integrations/field_spec.rb
+++ b/spec/models/integrations/field_spec.rb
@@ -186,6 +186,22 @@ RSpec.describe ::Integrations::Field, feature_category: :integrations do
end
end
+ describe '#api_type' do
+ it 'returns String' do
+ expect(field.api_type).to eq(String)
+ end
+
+ context 'when type is checkbox' do
+ before do
+ attrs[:type] = :checkbox
+ end
+
+ it 'returns Boolean' do
+ expect(field.api_type).to eq(::API::Integrations::Boolean)
+ end
+ end
+ end
+
describe '#key?' do
it { is_expected.to be_key(:type) }
it { is_expected.not_to be_key(:foo) }