Sha256: c547e24ecabf12b1e69426fd29b3558e75454cde21ea3977fe6a809f97abc537

Contents?: true

Size: 609 Bytes

Versions: 1

Compression:

Stored size: 609 Bytes

Contents

require 'helper'

class AttributeMappingTest < ActiveSupport::TestCase
  test "definition" do
    attribute_mapping = build :attribute_mapping, namespace: 'Business', attribute_name: 'status'

    assert_equal Business.attributes['status'], attribute_mapping.definition
  end

  test "target_class" do
    attribute_mapping = build :attribute_mapping, namespace: 'Business'
    assert_equal Business, attribute_mapping.target_class
  end

  test "to_option" do
    attribute_mapping = build :attribute_mapping, label: 'Foo', value: 'bar'

    assert_equal ['Foo', 'bar'], attribute_mapping.to_option
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
axle_attributes-1.13.2 test/models/attribute_mapping_test.rb