Sha256: eed37955ec962f26a59c52a4b29494cd1552d90648cbbada1f7d7e7abf3b0c59
Contents?: true
Size: 849 Bytes
Versions: 1
Compression:
Stored size: 849 Bytes
Contents
require 'test_helper' class ValueMapTest < ActiveSupport::TestCase test "value map can fetch what you supplied it" do expected_map = [[1, "Concordia"], [2, "McKendree"]] assert_equal expected_map, SetBuilder::ValueMap.for(:school) end test "value map should fetch the correct value" do expected_school = "Concordia" assert_equal expected_school, SetBuilder::ValueMap.to_s(:school, 1) end test "value map should fetch the correct value when passed as a string" do expected_school = "Concordia" assert_equal expected_school, SetBuilder::ValueMap.to_s("school", 1) end test "value map should generate json that can be handed to the client-side SetBuilder" do expected_json = "{\"school\":[[1,\"Concordia\"],[2,\"McKendree\"]]}" assert_equal expected_json, SetBuilder::ValueMap.to_json end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
set_builder-2.0.0.beta2 | test/value_map_test.rb |