Sha256: bba387ed1fe2a9661605d093d48ddce7959742f57a94ad6c6a7e681bf4814d0f

Contents?: true

Size: 754 Bytes

Versions: 11

Compression:

Stored size: 754 Bytes

Contents

require 'rails_helper'

RSpec.describe "manifestation_custom_properties/index", type: :view do
  before(:each) do
    assign(:manifestation_custom_properties, [
      ManifestationCustomProperty.create!(
        name: "name1",
        display_name: "カスタム項目1",
        note: "MyText"
      ),
      ManifestationCustomProperty.create!(
        name: "name2",
        display_name: "カスタム項目2",
        note: "MyText"
      )
    ])
  end

  it "renders a list of manifestation_custom_properties" do
    allow(view).to receive(:policy).and_return double(create?: true, update?: true, destroy?: true)
    render
    assert_select "tr>td", text: "name1".to_s, count: 1
    assert_select "tr>td", text: "MyText".to_s, count: 2
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
enju_biblio-0.3.18 spec/views/manifestation_custom_properties/index.html.erb_spec.rb
enju_biblio-0.3.17 spec/views/manifestation_custom_properties/index.html.erb_spec.rb
enju_biblio-0.3.16 spec/views/manifestation_custom_properties/index.html.erb_spec.rb
enju_biblio-0.3.15 spec/views/manifestation_custom_properties/index.html.erb_spec.rb
enju_biblio-0.3.14 spec/views/manifestation_custom_properties/index.html.erb_spec.rb
enju_biblio-0.3.13 spec/views/manifestation_custom_properties/index.html.erb_spec.rb
enju_biblio-0.3.12 spec/views/manifestation_custom_properties/index.html.erb_spec.rb
enju_biblio-0.3.11 spec/views/manifestation_custom_properties/index.html.erb_spec.rb
enju_biblio-0.3.10 spec/views/manifestation_custom_properties/index.html.erb_spec.rb
enju_biblio-0.3.10.rc.3 spec/views/manifestation_custom_properties/index.html.erb_spec.rb
enju_biblio-0.3.10.rc.2 spec/views/manifestation_custom_properties/index.html.erb_spec.rb