Sha256: 9f69d4c45fb4bc2551c022709f60f267c719260deb898f36d2113260945c9b7f
Contents?: true
Size: 959 Bytes
Versions: 16
Compression:
Stored size: 959 Bytes
Contents
require 'test_helper' module Workarea module Api module Admin class ReleaseChangesIntegrationTest < IntegrationTest include Workarea::Admin::IntegrationTest setup :set_sample_attributes def set_sample_attributes @release = create_release(name: 'API Release') @sample_attributes = create_product .as_json .except('_id', 'slug', 'last_indexed_at') end def test_creates_a_changeset_for_the_specific_release product = create_product(name: 'foo') patch admin_api.product_path(product.id), params: { product: { name: 'bar' }, release_id: @release.id.to_s } product.reload assert_equal('foo', product.name) changes = product.changesets.first assert_equal({ I18n.locale.to_s => 'bar' }, changes.changeset[:name]) end end end end end
Version data entries
16 entries across 16 versions & 2 rubygems