Sha256: 7af63247a02dd0574083525657da7ff5a4e2fac6e648f222d8f5ed1ef76f5d7a

Contents?: true

Size: 1.12 KB

Versions: 16

Compression:

Stored size: 1.12 KB

Contents

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

module Workarea
  module Api
    module Admin
      class RecommendationSettingsDocumentationTest < DocumentationTest
        include Workarea::Admin::IntegrationTest

        resource 'Recommendation Settings'

        def test_and_document_show
          description 'Showing recommendation settings'
          route admin_api.product_recommendation_settings_path(':product_id')

          record_request do
            get admin_api.product_recommendation_settings_path(create_recommendations.id)
            assert_equal(200, response.status)
          end
        end

        def test_and_document_update
          description 'Updating recommendation settings'
          route admin_api.product_recommendation_settings_path(':product_id')

          record_request do
            patch admin_api.product_recommendation_settings_path(create_recommendations.id),
                  params: { recommendation_settings: { product_ids: ['foo'] } },
                  as: :json

            assert_equal(204, 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 admin/test/documentation/workarea/api/admin/recommendation_settings_documentation_test.rb
workarea-api-admin-4.5.6 test/documentation/workarea/api/admin/recommendation_settings_documentation_test.rb
workarea-api-4.5.5 admin/test/documentation/workarea/api/admin/recommendation_settings_documentation_test.rb
workarea-api-admin-4.5.5 test/documentation/workarea/api/admin/recommendation_settings_documentation_test.rb
workarea-api-4.5.4 admin/test/documentation/workarea/api/admin/recommendation_settings_documentation_test.rb
workarea-api-admin-4.5.4 test/documentation/workarea/api/admin/recommendation_settings_documentation_test.rb
workarea-api-4.5.3 admin/test/documentation/workarea/api/admin/recommendation_settings_documentation_test.rb
workarea-api-admin-4.5.3 test/documentation/workarea/api/admin/recommendation_settings_documentation_test.rb
workarea-api-4.5.2 admin/test/documentation/workarea/api/admin/recommendation_settings_documentation_test.rb
workarea-api-admin-4.5.2 test/documentation/workarea/api/admin/recommendation_settings_documentation_test.rb
workarea-api-4.5.0 admin/test/documentation/workarea/api/admin/recommendation_settings_documentation_test.rb
workarea-api-admin-4.5.0 test/documentation/workarea/api/admin/recommendation_settings_documentation_test.rb
workarea-api-4.4.7 admin/test/documentation/workarea/api/admin/recommendation_settings_documentation_test.rb
workarea-api-admin-4.4.7 test/documentation/workarea/api/admin/recommendation_settings_documentation_test.rb
workarea-api-4.4.6 admin/test/documentation/workarea/api/admin/recommendation_settings_documentation_test.rb
workarea-api-admin-4.4.6 test/documentation/workarea/api/admin/recommendation_settings_documentation_test.rb