Sha256: 5651dcca438cad8b2ebbb9e247cdb65f476a4d52573401d468829183e437a71a

Contents?: true

Size: 972 Bytes

Versions: 1

Compression:

Stored size: 972 Bytes

Contents

require 'rails_helper'

RSpec.feature 'Document Attributes', type: :feature do
  describe 'respose_properties', js: true do
    it 'will list the documentation' do
      properties = [
        {
          key: 'success',
          type: 'Boolean'
        },
        {
          key: 'message',
          type: 'String',
          description: 'It can be any generic message.'
        }
      ]
      create_json = {
        name: 'Create Currency',
        end_point: '/currencies',
        published: true,
        response_properties: properties
      }
      DocumentationBuilder.create(create_json)

      visit '/apidoco'
      page.click_on('Response')

      expect(page).to have_text(properties[0][:key])
      expect(page).to have_text(properties[0][:type].downcase)

      expect(page).to have_text(properties[0][:key])
      expect(page).to have_text(properties[0][:type].downcase)
      expect(page).to have_text(properties[0][:description])
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
apidoco-1.6.4 spec/features/apidoco/documentation_attributes/response_properties_spec.rb