Sha256: 4a17cfc9f03a9f31de1a001d4e4d4b6196e2a101fa70c7802560e8733fbaef02

Contents?: true

Size: 1020 Bytes

Versions: 19

Compression:

Stored size: 1020 Bytes

Contents

require 'rails_helper'

describe "checkout_types/index" do
  fixtures :users, :roles, :user_has_roles

  before(:each) do
    view.extend EnjuLeaf::ApplicationHelper

    assign(:checkout_types, Kaminari::paginate_array([
      stub_model(CheckoutType,
                 name: "book",
                 display_name: "Book",
                 note: "MyText",
                 position: 1
      ),
      stub_model(CheckoutType,
                 name: "cd",
                 display_name: "CD",
                 note: "MyText",
                 position: 2
      )
    ]).page(1))
  end

  it "renders a list of checkout_types" do
    allow(view).to receive(:policy).and_return double(create?: true, update?: true, destroy?: true)
    render
    # Run the generator again with the --webrat flag if you want to use webrat matchers
    assert_select "tr>td:nth-child(3)", /Book/
    # Run the generator again with the --webrat flag if you want to use webrat matchers
    assert_select "tr>td:nth-child(3)", /MyText/
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
enju_circulation-0.3.11 spec/views/checkout_types/index.html.erb_spec.rb
enju_circulation-0.3.10 spec/views/checkout_types/index.html.erb_spec.rb
enju_circulation-0.3.9 spec/views/checkout_types/index.html.erb_spec.rb
enju_circulation-0.4.0.rc.1 spec/views/checkout_types/index.html.erb_spec.rb
enju_circulation-0.3.8 spec/views/checkout_types/index.html.erb_spec.rb
enju_circulation-0.3.7 spec/views/checkout_types/index.html.erb_spec.rb
enju_circulation-0.4.0.beta.4 spec/views/checkout_types/index.html.erb_spec.rb
enju_circulation-0.4.0.beta.3 spec/views/checkout_types/index.html.erb_spec.rb
enju_circulation-0.3.6 spec/views/checkout_types/index.html.erb_spec.rb
enju_circulation-0.4.0.beta.2 spec/views/checkout_types/index.html.erb_spec.rb
enju_circulation-0.4.0.beta.1 spec/views/checkout_types/index.html.erb_spec.rb
enju_circulation-0.3.5 spec/views/checkout_types/index.html.erb_spec.rb
enju_circulation-0.3.4 spec/views/checkout_types/index.html.erb_spec.rb
enju_circulation-0.3.3 spec/views/checkout_types/index.html.erb_spec.rb
enju_circulation-0.3.2 spec/views/checkout_types/index.html.erb_spec.rb
enju_circulation-0.3.1 spec/views/checkout_types/index.html.erb_spec.rb
enju_circulation-0.3.0 spec/views/checkout_types/index.html.erb_spec.rb
enju_circulation-0.3.0.rc.1 spec/views/checkout_types/index.html.erb_spec.rb
enju_circulation-0.3.0.beta.1 spec/views/checkout_types/index.html.erb_spec.rb