Sha256: f05b785df34faf985b5bf4735b0225757e23ec07b145e515c4e9ffb9007e5704

Contents?: true

Size: 599 Bytes

Versions: 47

Compression:

Stored size: 599 Bytes

Contents

require 'spec_helper'

describe 'curation_concerns/file_sets/show.json.jbuilder' do
  let(:file_set) { create(:file_set) }

  before do
    assign(:file_set, file_set)
    render
  end

  it "renders json of the curation_concern" do
    json = JSON.parse(rendered)
    expect(json['id']).to eq file_set.id
    expect(json['title']).to eq file_set.title
    expected_fields = file_set.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

47 entries across 47 versions & 1 rubygems

Version Path
curation_concerns-0.14.0.pre4 spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
curation_concerns-0.14.0.pre3 spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
curation_concerns-0.14.0.pre2 spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
curation_concerns-0.14.0.pre1 spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
curation_concerns-0.13.1 spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
curation_concerns-0.13.0 spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
curation_concerns-0.12.0 spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
curation_concerns-0.12.0.pre9 spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
curation_concerns-0.12.0.pre8 spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
curation_concerns-0.12.0.pre7 spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
curation_concerns-0.12.0.pre6 spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
curation_concerns-0.12.0.pre5 spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
curation_concerns-0.12.0.pre4 spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
curation_concerns-0.12.0.pre3 spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
curation_concerns-0.12.0.pre2 spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
curation_concerns-0.12.0.pre1 spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
curation_concerns-0.11.0 spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
curation_concerns-0.11.0.rc1 spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
curation_concerns-0.10.0 spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
curation_concerns-0.9.0 spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb