Sha256: 08640864bcb80f6ce2afed4ea8d1d5baf003db6062aefd9f09736d10aa74bac2

Contents?: true

Size: 728 Bytes

Versions: 12

Compression:

Stored size: 728 Bytes

Contents

require 'spec_helper'

module Alchemy
  describe ContentsController do
    let(:page)    { build_stubbed(:page) }
    let(:element) { build_stubbed(:element, page: page, position: 1) }
    let(:content) { build_stubbed(:content, element: element) }

    describe '#show' do
      before { expect(Content).to receive(:find).and_return(content) }

      context "requested for json format" do
        it "should render json response but warns about deprecation" do
          expect(ActiveSupport::Deprecation).to receive(:warn)
          get :show, id: content.id, format: :json
          expect(response.status).to eq(200)
          expect(response.content_type).to eq('application/json')
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
alchemy_cms-3.1.3 spec/controllers/contents_controller_spec.rb
alchemy_cms-3.1.1 spec/controllers/contents_controller_spec.rb
alchemy_cms-3.1.0 spec/controllers/contents_controller_spec.rb
alchemy_cms-3.1.0.rc3 spec/controllers/contents_controller_spec.rb
alchemy_cms-3.1.0.rc2 spec/controllers/contents_controller_spec.rb
alchemy_cms-3.1.0.rc1 spec/controllers/contents_controller_spec.rb
alchemy_cms-3.1.0.beta6 spec/controllers/contents_controller_spec.rb
alchemy_cms-3.1.0.beta5 spec/controllers/contents_controller_spec.rb
alchemy_cms-3.1.0.beta4 spec/controllers/contents_controller_spec.rb
alchemy_cms-3.1.0.beta3 spec/controllers/contents_controller_spec.rb
alchemy_cms-3.1.0.beta2 spec/controllers/contents_controller_spec.rb
alchemy_cms-3.1.0.beta1 spec/controllers/contents_controller_spec.rb