Sha256: 25925cbc6a824ed99057da1a35ae83b2e6275153f7b0e728e1542c1fcc3fe360

Contents?: true

Size: 850 Bytes

Versions: 4

Compression:

Stored size: 850 Bytes

Contents

require 'printfection'

module Printfection
  describe Asset, "properties" do
    let(:json) do
      JSON.parse <<-JSON
        {
          "id": 1,
          "object": "asset",
          "type": "display",
          "name": "AA-WhiteLogo-Front.png",
          "perspective": "front",
          "url": "https://img.printfection.com/18/26/234234lkajsdfdsf7/AA-WhiteLogo-Front.png",
          "notes": ""
        }
      JSON
    end

    it "gives access to JSON properties" do
      asset = Asset.new(json)
      expect(asset.id).to eql 1
      expect(asset.type).to eql "display"
      expect(asset.name).to eql "AA-WhiteLogo-Front.png"
      expect(asset.perspective).to eql "front"
      expect(asset.url).to eql "https://img.printfection.com/18/26/234234lkajsdfdsf7/AA-WhiteLogo-Front.png"
      expect(asset.notes).to eql ""
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
printfection-1.0.3 spec/asset_spec.rb
printfection-1.0.2 spec/asset_spec.rb
printfection-1.0.1 spec/asset_spec.rb
printfection-1.0.0 spec/asset_spec.rb