Sha256: 195ec6214cc17fb08398a00a58589a4065f9ed7b8592560612b7eb409e36cc3e

Contents?: true

Size: 619 Bytes

Versions: 2

Compression:

Stored size: 619 Bytes

Contents

require 'spec_helper'

describe 'User Unsubscribe' do

  context 'by email' do
    context 'when the user exists' do
      use_vcr_cassette 'unsubscribe email exists'

      it 'returns true' do
        response = board.users.unsubscribe("candidate@recruitmilitary.com")

        response.should be_true
      end
    end

    context 'when the user does not exist' do
      use_vcr_cassette 'unsubscribe email does not exist'

      it 'raises a not found error' do
        expect {
          board.users.unsubscribe("michael@jordan.com")
        }.to raise_error(Board::Client::NotFound)
      end
    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
board-client-0.99.1 spec/integration/users/unsubscribe_spec.rb
board-client-0.99.0 spec/integration/users/unsubscribe_spec.rb