Sha256: 544cb4cc7e4bf03e04bd997eb208782fc039bf86b990f4c563077c50ce52243b

Contents?: true

Size: 813 Bytes

Versions: 47

Compression:

Stored size: 813 Bytes

Contents

describe MangoPay::Hook do
  include_context 'hooks'

  describe 'CREATE' do
    it 'creates a hook' do
      expect(new_hook['Id']).to_not be_nil
    end
  end

  describe 'UPDATE' do
    it 'updates a hook' do
      new_url = new_hook['Url'] + '.com'
      updated_hook = MangoPay::Hook.update(new_hook['Id'], {
        Url: new_url,
        Tag: 'Updated Tag'
      })
    expect(updated_hook['Url']).to eq(new_url)
      expect(updated_hook['Tag']).to eq('Updated Tag')
    end
  end

  describe 'FETCH' do

    it 'fetches a hook' do
      hook = MangoPay::Hook.fetch(new_hook['Id'])
      expect(hook['Id']).to eq(new_hook['Id'])
    end

    it 'fetches all the hooks' do
      hooks = MangoPay::Hook.fetch()
      expect(hooks).to be_kind_of(Array)
      expect(hooks).not_to be_empty
    end

  end

end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
mangopay-3.28.0 spec/mangopay/hook_spec.rb
mangopay-3.27.0 spec/mangopay/hook_spec.rb
mangopay-3.26.1 spec/mangopay/hook_spec.rb
mangopay-3.26.0 spec/mangopay/hook_spec.rb
mangopay-3.25.1 spec/mangopay/hook_spec.rb
mangopay-3.25.0 spec/mangopay/hook_spec.rb
mangopay-3.24.1 spec/mangopay/hook_spec.rb
mangopay-3.24.0 spec/mangopay/hook_spec.rb
mangopay-3.23.0 spec/mangopay/hook_spec.rb
mangopay-3.22.0 spec/mangopay/hook_spec.rb
mangopay-3.21.0 spec/mangopay/hook_spec.rb
mangopay-3.20.0 spec/mangopay/hook_spec.rb
mangopay-3.19.0 spec/mangopay/hook_spec.rb
mangopay-3.18.0 spec/mangopay/hook_spec.rb
mangopay-3.17.0 spec/mangopay/hook_spec.rb
mangopay-3.16.0 spec/mangopay/hook_spec.rb
mangopay-3.15.0 spec/mangopay/hook_spec.rb
mangopay-3.14.0 spec/mangopay/hook_spec.rb
mangopay-3.13.2 spec/mangopay/hook_spec.rb
mangopay-3.12.0 spec/mangopay/hook_spec.rb