Sha256: 64213d4d33a7a035c6cb6fbed34d20598af759856dbdbfbbde032beb1c37cf9e

Contents?: true

Size: 834 Bytes

Versions: 1

Compression:

Stored size: 834 Bytes

Contents

require_relative '../../lib/storyblok/request'
require 'spec_helper'

describe Storyblok::Request do
  subject { described_class.new(client, endpoint) }

  let(:client) { 'fake_client' }
  let(:endpoint) { 'some.url.com' }
  let(:query) { {my_key: 'my_value'} }
  let(:id) { 222 }

  context "#copy" do
    it "Returns a copy of StoryBlock:Request object initialized" do
      object_duplicated = subject.copy
      expect(subject.client).to        eq(object_duplicated.client)
      expect(subject.endpoint).to      eq(object_duplicated.endpoint)
      expect(subject.query).to         eq(object_duplicated.query)
      expect(subject.id).to            eq(object_duplicated.id)
      expect(subject.type).to          eq(object_duplicated.type)
      expect(subject.object_id).not_to eq(object_duplicated.object_id)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
storyblok-3.0.0 spec/lib/storyblok_request_spec.rb