Sha256: a93ec6b7cad403ed668abb07eb96840d222a4fea630299ff877ca6c8647add20

Contents?: true

Size: 711 Bytes

Versions: 9

Compression:

Stored size: 711 Bytes

Contents

require 'rails_helper'

describe "accepts/index" do
  fixtures :all

  before(:each) do
    assign(:accepts, Kaminari::paginate_array([
      stub_model(Accept,
        :item_id => 1,
        :created_at => Time.zone.now
      ),
      stub_model(Accept,
        :item_id => 1,
        :created_at => Time.zone.now
      )
    ]).page(1))
    basket = FactoryGirl.create(:basket)
    assign(:basket, basket)
    assign(:accept, basket.accepts.new)
  end

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

Version data entries

9 entries across 7 versions & 2 rubygems

Version Path
enju_library-0.2.3 spec/views/accepts/index.html.erb_spec.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/enju_library-0.2.2/spec/views/accepts/index.html.erb_spec.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/enju_library-0.2.1/spec/views/accepts/index.html.erb_spec.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/bundler/gems/enju_library-d36f415e177e/spec/views/accepts/index.html.erb_spec.rb
enju_library-0.2.2 spec/views/accepts/index.html.erb_spec.rb
enju_library-0.2.1 spec/views/accepts/index.html.erb_spec.rb
enju_library-0.2.0 spec/views/accepts/index.html.erb_spec.rb
enju_library-0.2.0.beta.10 spec/views/accepts/index.html.erb_spec.rb
enju_library-0.2.0.beta.9 spec/views/accepts/index.html.erb_spec.rb