Sha256: 7bda4d03f29ad3e17759985083b74e95acd36d68b816754c62e8c4a4580374ce
Contents?: true
Size: 1.3 KB
Versions: 15
Compression:
Stored size: 1.3 KB
Contents
# frozen_string_literal: true require 'spec_helper' describe SwaggerDocsGenerator::Actions::Form, type: :parser, name: :params_form do let(:param_name) { nil } let(:param_description) { nil } let(:param_required) { nil } let(:param) do pname = param_name pdescription = param_description prequired = param_required SwaggerDocsGenerator::Actions::Parameter.new do form do name pname description pdescription required prequired end end end context 'when attribute complete' do let(:param_name) { Faker::Color.color_name } let(:param_description) { Faker::Beer.name } let(:param_required) { Faker::Boolean.boolean } it_behaves_like 'parameters form haves' end context 'when attribute is incomplete' do it_behaves_like 'parameters form haves' end context 'when name attribute alone' do let(:param_name) { Faker::Color.color_name } it_behaves_like 'parameters form haves' end context 'when description attribute alone' do let(:param_description) { Faker::Beer.name } it_behaves_like 'parameters form haves' end context 'when required attribute alone' do let(:param_required) { Faker::Boolean.boolean } it_behaves_like 'parameters form haves' end end
Version data entries
15 entries across 15 versions & 1 rubygems