Sha256: b88ba2ddb5bb2d7917eec9f427d4a5ebf6f8b27f0b3bc2412d9c90b72f1f3f0f

Contents?: true

Size: 739 Bytes

Versions: 8

Compression:

Stored size: 739 Bytes

Contents

require 'spec_helper'

describe RedboothRuby::ClientOperations::Metadata, vcr: 'metadata' do
  include_context 'authentication'

  let(:search_params) do
    { target_type: 'Task',
      key: 'new',
      value: 'metadata' }
  end
  let(:endpoint) { 'metadata/search' }

  describe '.metadata' do
    subject { client.metadata(search_params) }

    it 'makes a new GET request using the correct API endpoint to receive notes collection' do
      expect(RedboothRuby).to receive(:request).with(:get, nil, endpoint, search_params, { session: session }).and_call_original
      subject
    end

    it { expect(subject.class).to eql RedboothRuby::Request::Collection }
    it { expect(subject.all.first).to be_a RedboothRuby::Base }
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
redbooth-ruby-0.2.3 spec/redbooth-ruby/client_operations/metadata_spec.rb
redbooth-ruby-0.2.2 spec/redbooth-ruby/client_operations/metadata_spec.rb
redbooth-ruby-0.2.1 spec/redbooth-ruby/client_operations/metadata_spec.rb
redbooth-ruby-0.2.0 spec/redbooth-ruby/client_operations/metadata_spec.rb
redbooth-ruby-0.1.4 spec/redbooth-ruby/client_operations/metadata_spec.rb
redbooth-ruby-0.1.3 spec/redbooth-ruby/client_operations/metadata_spec.rb
redbooth-ruby-0.1.1 spec/redbooth-ruby/client_operations/metadata_spec.rb
redbooth-ruby-0.1.0 spec/redbooth-ruby/client_operations/metadata_spec.rb