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-1.3.3 spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
curation_concerns-1.3.2 spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
curation_concerns-1.3.1 spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
curation_concerns-1.3.0 spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
curation_concerns-1.2.0 spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
curation_concerns-1.1.2 spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
curation_concerns-1.1.1 spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
curation_concerns-1.1.0 spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
curation_concerns-1.0.0 spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
curation_concerns-1.0.0.beta10 spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
curation_concerns-1.0.0.beta9 spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
curation_concerns-1.0.0.beta8 spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
curation_concerns-1.0.0.beta7 spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
curation_concerns-1.0.0.beta6 spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
curation_concerns-1.0.0.beta5 spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
curation_concerns-1.0.0.beta4 spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
curation_concerns-1.0.0.beta3 spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
curation_concerns-1.0.0.beta2 spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
curation_concerns-1.0.0.beta1 spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
curation_concerns-0.14.0 spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb