Sha256: 991771b93e32fea4536884504d32761b9a9a7bbd1458e1d69a0387d47fb46767

Contents?: true

Size: 671 Bytes

Versions: 62

Compression:

Stored size: 671 Bytes

Contents

require File.dirname(__FILE__) + '/../../spec_helper'
require File.dirname(__FILE__) + '/../spec_helper_tables' unless metaclass.class_variable_defined? :@@set_up_demo_tables

describe "Sequel::Serializer" do
  describe "to_fos_json method adds options to only for" do
    it "single sequel model" do
      add_test_table_data({:id=>1,:'goofy name col' => 123})
      data = TestTable.first
      mock(data).to_json({:only=>[]})
      data.to_fos_json
    end

    it "an array of sequel models" do
      add_test_table_data({:id=>1,:'goofy name col' => 123})
      data = [TestTable.first]
      mock(data).to_json({:only=>[]})
      data.to_fos_json
    end

  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
fossil-0.4.3 spec/sequel/serializer/json_serializer_spec.rb
fossil-0.4.2 spec/sequel/serializer/json_serializer_spec.rb
fossil-0.4.1 spec/sequel/serializer/json_serializer_spec.rb
fossil-0.4.0 spec/sequel/serializer/json_serializer_spec.rb
fossil-0.3.49 spec/sequel/serializer/json_serializer_spec.rb
fossil-0.3.48 spec/sequel/serializer/json_serializer_spec.rb
fossil-0.3.47 spec/sequel/serializer/json_serializer_spec.rb
fossil-0.3.46 spec/sequel/serializer/json_serializer_spec.rb
fossil-0.3.45 spec/sequel/serializer/json_serializer_spec.rb
fossil-0.3.44 spec/sequel/serializer/json_serializer_spec.rb
fossil-0.3.43 spec/sequel/serializer/json_serializer_spec.rb
fossil-0.3.42 spec/sequel/serializer/json_serializer_spec.rb
fossil-0.3.41 spec/sequel/serializer/json_serializer_spec.rb
fossil-0.3.40 spec/sequel/serializer/json_serializer_spec.rb
fossil-0.3.39 spec/sequel/serializer/json_serializer_spec.rb
fossil-0.3.38 spec/sequel/serializer/json_serializer_spec.rb
fossil-0.3.37 spec/sequel/serializer/json_serializer_spec.rb
fossil-0.3.36 spec/sequel/serializer/json_serializer_spec.rb
fossil-0.3.35 spec/sequel/serializer/json_serializer_spec.rb
fossil-0.3.34 spec/sequel/serializer/json_serializer_spec.rb