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