Sha256: 11f376971758f8968bbb6c1aa1deb0640095f7288ee94ce4a56cb5e48880e923

Contents?: true

Size: 507 Bytes

Versions: 8

Compression:

Stored size: 507 Bytes

Contents

require 'spec_helper'

describe 'expect_json_keys' do
	it 'should fail when json keys are missing' do
		mock_get('simple_json')
		get '/simple_json', {}
		expect{expect_json_keys([:foo, :bar, :baz, :bax])}.to raise_error
	end

	it 'should ensure correct json keys' do
		mock_get('simple_json')
		get '/simple_json', {}
		expect_json_keys([:foo, :bar, :baz])
	end	

	it 'should ensure correct partial json keys' do
		mock_get('simple_json')
		get '/simple_json', {}
		expect_json_keys([:foo, :bar])
	end	
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
airborne-0.0.21 spec/airborne/expect_json_keys_spec.rb
airborne-0.0.20 spec/airborne/expect_json_keys_spec.rb
airborne-0.0.19 spec/airborne/expect_json_keys_spec.rb
airborne-0.0.18 spec/airborne/expect_json_keys_spec.rb
airborne-0.0.17 spec/airborne/expect_json_keys_spec.rb
airborne-0.0.16 spec/airborne/expect_json_keys_spec.rb
airborne-0.0.15 spec/airborne/expect_json_keys_spec.rb
airborne-0.0.14 spec/airborne/expect_json_keys_spec.rb