Sha256: 98534a71c1575d73115d7d5f70097f99b51e9c44373af6cf1a6f56d01e2813d8

Contents?: true

Size: 681 Bytes

Versions: 15

Compression:

Stored size: 681 Bytes

Contents

require 'spec_helper'
require 'date'

describe 'expect_json_types with date' do
	it 'should verify correct date types' do
		mock_get('date_response')
		get '/date_response'

		expect_json_types({createdAt: :date})
	end

	it 'should verify correct date types with path' do
		mock_get('date_response')
		get '/date_response'

		expect_json_types("createdAt", :date)
	end
end

describe 'expect_json with date' do
	it 'should verify correct date value' do
		mock_get('date_response')
		get '/date_response'

		prev_day = DateTime.new(2014,10,19)
		next_day = DateTime.new(2014,10,21)
		expect_json({createdAt: date {|value| expect(value).to be_between(prev_day, next_day)}})		
	end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
airborne-0.1.15 spec/airborne/expectations/expect_json_types_date_spec.rb
airborne-0.1.14 spec/airborne/expectations/expect_json_types_date_spec.rb
airborne-0.1.13 spec/airborne/expectations/expect_json_types_date_spec.rb
airborne-0.1.12 spec/airborne/expectations/expect_json_types_date_spec.rb
airborne-0.1.11 spec/airborne/expectations/expect_json_types_date_spec.rb
airborne-0.1.10 spec/airborne/expectations/expect_json_types_date_spec.rb
airborne-0.1.9 spec/airborne/expectations/expect_json_types_date_spec.rb
airborne-0.1.8 spec/airborne/expectations/expect_json_types_date_spec.rb
airborne-0.1.7 spec/airborne/expectations/expect_json_types_date_spec.rb
airborne-0.1.6 spec/airborne/expectations/expect_json_types_date_spec.rb
airborne-0.1.5 spec/airborne/expectations/expect_json_types_date_spec.rb
airborne-0.1.4 spec/airborne/expectations/expect_json_types_date_spec.rb
airborne-0.1.3 spec/airborne/expectations/expect_json_types_date_spec.rb
airborne-0.1.2 spec/airborne/expectations/expect_json_types_date_spec.rb
airborne-0.1.1 spec/airborne/expectations/expect_json_types_date.rb