Sha256: 4af0731cc5abb3a2d45e2acba6f8085fc7d8d8882d48a949def1fdc5d033cc87
Contents?: true
Size: 1.02 KB
Versions: 6
Compression:
Stored size: 1.02 KB
Contents
require_relative '../spec_helper.rb' require 'ogre' VCR.configure do |config| config.cassette_library_dir = 'spec/fixtures/vcr_cassettes' config.hook_into :webmock # remove sensitive authentication information from the recording config.before_record do |interaction| headers = interaction.request.headers headers.keys .select { |k| k =~ /^X-Ops-(Authorization-|Content-Hash)/ } .each { |header| headers[header] = Array("{{#{header}}}") } headers['X-Ops-Userid'] = 'pivotal' end end describe Ogre::UserDelete do it 'should delete user' do args = %w(user -f) + DEFAULTS response = "'user' has been deleted.\n" VCR.use_cassette('user-delete') do expect { Ogre::UserDelete.start(args) }.to output(response).to_stdout end end it 'should fail user not found' do args = %w(unknown -f) + DEFAULTS response = "'unknown' not found.\n" VCR.use_cassette('user-delete-not-found') do expect { Ogre::UserDelete.start(args) }.to output(response).to_stdout end end end
Version data entries
6 entries across 6 versions & 1 rubygems