Sha256: b87caae08edc6d94304e64ef494ec53853b364f4ad7142569c48575e96ab5d8e

Contents?: true

Size: 709 Bytes

Versions: 11

Compression:

Stored size: 709 Bytes

Contents

require 'rails_helper'

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

  it "renders a list of item_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/item_custom_properties/index.html.erb_spec.rb
enju_biblio-0.3.17 spec/views/item_custom_properties/index.html.erb_spec.rb
enju_biblio-0.3.16 spec/views/item_custom_properties/index.html.erb_spec.rb
enju_biblio-0.3.15 spec/views/item_custom_properties/index.html.erb_spec.rb
enju_biblio-0.3.14 spec/views/item_custom_properties/index.html.erb_spec.rb
enju_biblio-0.3.13 spec/views/item_custom_properties/index.html.erb_spec.rb
enju_biblio-0.3.12 spec/views/item_custom_properties/index.html.erb_spec.rb
enju_biblio-0.3.11 spec/views/item_custom_properties/index.html.erb_spec.rb
enju_biblio-0.3.10 spec/views/item_custom_properties/index.html.erb_spec.rb
enju_biblio-0.3.10.rc.3 spec/views/item_custom_properties/index.html.erb_spec.rb
enju_biblio-0.3.10.rc.2 spec/views/item_custom_properties/index.html.erb_spec.rb