Sha256: 5e8c86a3a938f0ebd2693c3186d4418e0297481eb6d7b6a6c21f744f6d0e66b5

Contents?: true

Size: 913 Bytes

Versions: 16

Compression:

Stored size: 913 Bytes

Contents

require 'test_helper'
require 'workarea/api/documentation_test'

module Workarea
  module Api
    module Storefront
      class TaxonsDocumentationTest < DocumentationTest
        resource 'Taxons'

        setup :set_taxons

        def set_taxons
          @taxon = create_taxon(
            name: 'Mens',
            url: 'http://example.com/pages/mens'
          )

          @taxon.children.create!(name: 'Sale')
        end

        def test_and_document_show
          description 'Showing a taxon'
          route storefront_api.taxon_path(':id')
          explanation <<-EOS
            This endpoint will show details on a particular node (or taxon) of
            the site taxonomy, along with its children.
          EOS

          record_request do
            get storefront_api.taxon_path(@taxon)
            assert_equal(200, response.status)
          end
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
workarea-api-4.5.6 storefront/test/documentation/workarea/api/storefront/taxons_documentation_test.rb
workarea-api-storefront-4.5.6 test/documentation/workarea/api/storefront/taxons_documentation_test.rb
workarea-api-4.5.5 storefront/test/documentation/workarea/api/storefront/taxons_documentation_test.rb
workarea-api-storefront-4.5.5 test/documentation/workarea/api/storefront/taxons_documentation_test.rb
workarea-api-4.5.4 storefront/test/documentation/workarea/api/storefront/taxons_documentation_test.rb
workarea-api-storefront-4.5.4 test/documentation/workarea/api/storefront/taxons_documentation_test.rb
workarea-api-4.5.3 storefront/test/documentation/workarea/api/storefront/taxons_documentation_test.rb
workarea-api-storefront-4.5.3 test/documentation/workarea/api/storefront/taxons_documentation_test.rb
workarea-api-4.5.2 storefront/test/documentation/workarea/api/storefront/taxons_documentation_test.rb
workarea-api-storefront-4.5.2 test/documentation/workarea/api/storefront/taxons_documentation_test.rb
workarea-api-4.5.0 storefront/test/documentation/workarea/api/storefront/taxons_documentation_test.rb
workarea-api-storefront-4.5.0 test/documentation/workarea/api/storefront/taxons_documentation_test.rb
workarea-api-4.4.7 storefront/test/documentation/workarea/api/storefront/taxons_documentation_test.rb
workarea-api-storefront-4.4.7 test/documentation/workarea/api/storefront/taxons_documentation_test.rb
workarea-api-4.4.6 storefront/test/documentation/workarea/api/storefront/taxons_documentation_test.rb
workarea-api-storefront-4.4.6 test/documentation/workarea/api/storefront/taxons_documentation_test.rb