Sha256: be20b7c602fc41dac9e88557f52fc6c94e80875035e3b81652fbdfc214a8b1bd

Contents?: true

Size: 681 Bytes

Versions: 4

Compression:

Stored size: 681 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe "Custom Attributes" do
  before(:each) do
    @person = Fabricate(:person, :place => Fabricate(:place))
    
    @params = {
      :searchable_columns => ["first_name", "last_name", "age", "date_of_birth", "gender"],
      :column_search => {},
      :limit => "5",
      :offset => "0",
      :search => "",
      :sort_column => "",
      :sort_direction => ""
    }
  end
  
  it "should return the correctly formatted attributes" do
    date = 10.years.ago
    @person.date_of_birth = date
    @person.jtable_custom_attributes_attribute_date_of_birth.should eql(date.strftime("%m/%d/%Y"))
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
jtable-rails-0.2.5 spec/model_specs/custom_attributes_spec.rb
jtable-rails-0.2.4 spec/model_specs/custom_attributes_spec.rb
jtable-rails-0.2.3 spec/model_specs/custom_attributes_spec.rb
jtable-rails-0.2.2 spec/model_specs/custom_attributes_spec.rb