Sha256: bea0ebb2253025471bcb6b4415e019388eb606a4f0fcf707d67f3581f6a6cb78

Contents?: true

Size: 1011 Bytes

Versions: 5

Compression:

Stored size: 1011 Bytes

Contents

require File.expand_path("../../../spec_helper", __FILE__)

describe Instagram::Client do
  Instagram::Configuration::VALID_FORMATS.each do |format|
    context ".new(:format => '#{format}')" do
      before do
        @client = Instagram::Client.new(format: format, client_id: "CID", client_secret: "CS", client_ips: "1.2.3.4", access_token: "AT")
      end

      describe ".utils_raw_response" do
        before do
          stub_get("users/self/feed.#{format}")
            .with(query: { access_token: @client.access_token })
            .to_return(body: fixture("user_media_feed.#{format}"), headers: { content_type: "application/#{format}; charset=utf-8" })
        end

        before(:each) do
          @response = @client.utils_raw_response
        end

        it "return raw data" do
          expect(@response).to be_instance_of(Faraday::Response)
        end

        it "response content headers" do
          expect(@response).to be_respond_to(:headers)
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
instagram-continued-continued-1.5.0 spec/instagram/client/utils_spec.rb
instagram-continued-1.4.0 spec/instagram/client/utils_spec.rb
instagram-continued-1.3.3 spec/instagram/client/utils_spec.rb
instagram-continued-1.3.2 spec/instagram/client/utils_spec.rb
instagram-continued-1.3.1 spec/instagram/client/utils_spec.rb