Sha256: 85227d70fc7d809afb2b9fba8da73e55ff994cb31889c02e047ae657bf39bc53
Contents?: true
Size: 571 Bytes
Versions: 41
Compression:
Stored size: 571 Bytes
Contents
require 'spec_helper' require 'gris/grape_extensions/crud_helpers' describe Gris::CrudHelpers do before do @helper = SpecCrudHelper.new end it 'returns permitted_params' do @helper.params = { id: 1 } expect(@helper.permitted_params).to eq(id: 1) end it 'uses date time helpers' do @helper.datetime_params :created_at @helper.params = { message: 'hi', created_at: 1_293_901_200 } expected = { created_at: 'Sat, 01 Jan 2011 17:00:00 +0000', message: 'hi' } expect(@helper.permitted_params).to eq(expected) end end
Version data entries
41 entries across 41 versions & 1 rubygems