Sha256: c53d84f728b3ad96de732e355e3a2fcf07b85437f2602f8ec48e7abe2c6ed652

Contents?: true

Size: 658 Bytes

Versions: 49

Compression:

Stored size: 658 Bytes

Contents

require 'spec_helper'

describe 'curation_concerns/base/show.json.jbuilder' do
  let(:curation_concern) { FactoryGirl.create(:generic_work) }

  before do
    assign(:curation_concern, curation_concern)
    render
  end

  it "renders json of the curation_concern" do
    json = JSON.parse(rendered)
    expect(json['id']).to eq curation_concern.id
    expect(json['title']).to eq curation_concern.title
    expected_fields = curation_concern.class.fields.select { |f| ![:has_model, :create_date].include? f }
    expected_fields << :date_created
    expected_fields.each do |field_symbol|
      expect(json).to have_key(field_symbol.to_s)
    end
  end
end

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
curation_concerns-1.5.0 spec/views/curation_concerns/base/show.json.jbuilder_spec.rb
curation_concerns-1.4.0 spec/views/curation_concerns/base/show.json.jbuilder_spec.rb
curation_concerns-1.3.3 spec/views/curation_concerns/base/show.json.jbuilder_spec.rb
curation_concerns-1.3.2 spec/views/curation_concerns/base/show.json.jbuilder_spec.rb
curation_concerns-1.3.1 spec/views/curation_concerns/base/show.json.jbuilder_spec.rb
curation_concerns-1.3.0 spec/views/curation_concerns/base/show.json.jbuilder_spec.rb
curation_concerns-1.2.0 spec/views/curation_concerns/base/show.json.jbuilder_spec.rb
curation_concerns-1.1.2 spec/views/curation_concerns/base/show.json.jbuilder_spec.rb
curation_concerns-1.1.1 spec/views/curation_concerns/base/show.json.jbuilder_spec.rb
curation_concerns-1.1.0 spec/views/curation_concerns/base/show.json.jbuilder_spec.rb
curation_concerns-1.0.0 spec/views/curation_concerns/base/show.json.jbuilder_spec.rb
curation_concerns-1.0.0.beta10 spec/views/curation_concerns/base/show.json.jbuilder_spec.rb
curation_concerns-1.0.0.beta9 spec/views/curation_concerns/base/show.json.jbuilder_spec.rb
curation_concerns-1.0.0.beta8 spec/views/curation_concerns/base/show.json.jbuilder_spec.rb
curation_concerns-1.0.0.beta7 spec/views/curation_concerns/base/show.json.jbuilder_spec.rb
curation_concerns-1.0.0.beta6 spec/views/curation_concerns/base/show.json.jbuilder_spec.rb
curation_concerns-1.0.0.beta5 spec/views/curation_concerns/base/show.json.jbuilder_spec.rb
curation_concerns-1.0.0.beta4 spec/views/curation_concerns/base/show.json.jbuilder_spec.rb
curation_concerns-1.0.0.beta3 spec/views/curation_concerns/base/show.json.jbuilder_spec.rb
curation_concerns-1.0.0.beta2 spec/views/curation_concerns/base/show.json.jbuilder_spec.rb