Sha256: 864ebf030764532a06abd78ba0806dc2dd92eed5927bbd4d3be0d140932f27b1

Contents?: true

Size: 670 Bytes

Versions: 3

Compression:

Stored size: 670 Bytes

Contents

require 'spec_helper'

describe GrooveHQ::Client::Attachments, integration: true do

  let(:client) { GrooveHQ::Client.new }

  describe "#attachments" do

    let(:response) { client.attachments(message_id) }

    context "when message has attachments" do
      let(:message_id) { '9789054751' } # message with attachments

      it "successfully gets attachments" do
        expect(response).to be_instance_of GrooveHQ::ResourceCollection
      end
    end

    context "when message has no attachments" do
      let(:message_id) { '25662182"' } # message without attachments

      it "returns nil" do
        expect(response).to be_nil
      end
    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
groovehq-1.0.7 spec/groovehq/integration/attachments_spec.rb
groovehq-1.0.6 spec/groovehq/integration/attachments_spec.rb
groovehq-1.0.5 spec/groovehq/integration/attachments_spec.rb