Sha256: efa78347040f23437075d9dc66c717d7654dc194814304a87a94037a0f9948c5

Contents?: true

Size: 740 Bytes

Versions: 1

Compression:

Stored size: 740 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

1 entries across 1 versions & 1 rubygems

Version Path
redbooth-ruby-0.0.5 spec/redbooth-ruby/client_operations/metadata_spec.rb