Sha256: 54d912e8e634dccc0d6e23abb7ed82c6792d3cef698e3b3df79ea132a7121baf

Contents?: true

Size: 486 Bytes

Versions: 5

Compression:

Stored size: 486 Bytes

Contents

# encoding: utf-8
require "spec_helper"

module Okei
  module Api
    module V1

      describe "_unit.json", caching: true do

        def render_page_with(unit)
          render partial: "okei/api/v1/units/unit.json", locals: { unit: unit }
        end

        let!(:unit) { create :unit }
        before      { render_page_with unit }

        it "uses caching" do
          expect(unit).not_to receive(:code)
          render_page_with unit
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
okei-1.0.2 spec/views/okei/api/v1/units/_unit.json_spec.rb
okei-1.0.1 spec/views/okei/api/v1/units/_unit.json_spec.rb
okei-1.0.0 spec/views/okei/api/v1/units/_unit.json_spec.rb
okei-1.0.0.pre.rc spec/views/okei/api/v1/units/_unit.json_spec.rb
okei-0.0.2 spec/views/okei/api/v1/units/_unit.json_spec.rb