Sha256: 2dbec94a80361d81b1f511c1b857367e72781c698501b7e799f712348c6d6208

Contents?: true

Size: 1.04 KB

Versions: 4

Compression:

Stored size: 1.04 KB

Contents

require 'helper'

describe Yotpo::Image do
  describe '#get_image' do
    before(:all) do
      VCR.use_cassette('get_image') do
        @response = Yotpo.get_image(id: 5, app_key: @app_key)
      end
    end

    subject { @response.body.image }
    it { should respond_to :id }
    it { should respond_to :image_url }
    it { should respond_to :big_image_url }
    it { should respond_to :image_content_type }
    it { should respond_to :image_width }
    it { should respond_to :image_height }
  end

  describe '#list_images' do
    before(:all) do
      VCR.use_cassette('list_images') do
        @response = Yotpo.list_images(ids: [23,24], app_key: @app_key)
      end
    end

    subject { @response.body.images }
    it { should respond_to :count }

    subject { @response.body.images.first }
    it { should respond_to :id }
    it { should respond_to :image_url }
    it { should respond_to :big_image_url }
    it { should respond_to :image_content_type }
    it { should respond_to :image_width }
    it { should respond_to :image_height }
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
yotpo-1.0.6 spec/api/image_spec.rb
yotpo-1.0.5 spec/api/image_spec.rb
yotpo-1.0.4 spec/api/image_spec.rb
yotpo-1.0.3 spec/api/image_spec.rb