Sha256: b99a19fbbf8e22f8f415a75c3583910268cffbdb44c8f8ba0c8ea1d5013af632
Contents?: true
Size: 803 Bytes
Versions: 1
Compression:
Stored size: 803 Bytes
Contents
require 'spec_helper' require 'rspec/bdd' RSpec.feature 'Deleting a kit' do given(:client) { Typekit::Client.new(token: token) } shared_scenarios 'Adequate behavior' do options = { vcr: { cassette_name: 'delete_kits_xxx_ok' } } scenario 'Success', options do expect(result).to be true end options = { vcr: { cassette_name: 'delete_kits_xxx_not_found' } } scenario 'Failure', options do expect { result }.to raise_error(Typekit::ServerError, /Not found/i) end end context 'Using Client' do given(:result) { client.delete(:kits, 'xxx') } include_scenarios 'Adequate behavior' end context 'Using Record' do given(:kit) { client::Kit.new(id: 'xxx') } given(:result) { kit.delete! } include_scenarios 'Adequate behavior' end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
typekit-client-0.0.6 | spec/feature/delete_kit_spec.rb |