Sha256: 5b93af4d2529b94a118e6a67aebda44f04680186388856eee520492b3d2f8e85
Contents?: true
Size: 842 Bytes
Versions: 10
Compression:
Stored size: 842 Bytes
Contents
require 'spec_helper' describe 'Error Requests' do it 'will return 404 (Unauthorized) if resource not found' do expect_vcr("not found"){ create_client.entry 'not found' }.to raise_error(Contentful::NotFound) end it 'will return 400 (BadRequest) if invalid parameters have been passed' do expect_vcr("bad request"){ create_client.entries(some: 'parameter') }.to raise_error(Contentful::BadRequest) end it 'will return 403 (AccessDenied) if ...' do pending end it 'will return 401 (Unauthorized) if wrong credentials given' do client = Contentful::Client.new(space: "wrong", access_token: "credentials") expect_vcr("unauthorized"){ client.entry 'nyancat' }.to raise_error(Contentful::Unauthorized) end it 'will return 500 (ServerError) if ...' do pending end end
Version data entries
10 entries across 10 versions & 1 rubygems