Sha256: 771a0b9e793647ca3fabb07811dd5317c81c7b5b62a56a7c17ce73fa8e6e7d0c

Contents?: true

Size: 1.1 KB

Versions: 1

Compression:

Stored size: 1.1 KB

Contents

require 'helper'

describe Feedlr::Gateway::Microsoft, vcr: { record: :new_episodes } do
  let(:client) do
    Feedlr::Client.new(sandbox: true, oauth_access_token: access_token)
  end
  describe '#unlink_microsoft'  do

    it 'sends a delete request' do
      stub = stub_request(:delete, 'http://sandbox.feedly.com/v3/microsoft/' \
        'liveAuth')
      client.unlink_microsoft
      expect(stub).to have_been_requested
    end

    it 'resoponds with hashie object' do
      subject = client.unlink_microsoft
      expect(subject).to be_a(Feedlr::Success)
    end
  end

  describe '#add_to_onenote' do
    let(:entry_id) do
      'k3wM4lkt2uyzklIaZG/piLCFwWpRsuSz4luWQLHP0YY=_142814c6526:338b:2190d777'
    end
    it 'sends a get request' do
      stub = stub_request(:post, 'http://sandbox.feedly.com/v3/microsoft/' \
        'oneNoteAdd').with(body: MultiJson.dump(entryId: entry_id))

      client.add_to_onenote(entry_id)
      expect(stub).to have_been_requested
    end

    it 'resoponds with hashie object' do
      subject = client.add_to_onenote(entry_id)
      expect(subject.pageUrl).to be
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
feedlr-0.1.0 spec/feedly/gateway/microsoft_spec.rb