Sha256: 434411801fa44eeaa64bd69a0ccb26cf398cab0bdd94833ed1cfe1f1772549a8

Contents?: true

Size: 710 Bytes

Versions: 8

Compression:

Stored size: 710 Bytes

Contents

require 'spec_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

8 entries across 8 versions & 1 rubygems

Version Path
enju_library-0.2.0.beta.8 spec/views/accepts/index.html.erb_spec.rb
enju_library-0.2.0.beta.7 spec/views/accepts/index.html.erb_spec.rb
enju_library-0.2.0.beta.6 spec/views/accepts/index.html.erb_spec.rb
enju_library-0.2.0.beta.5 spec/views/accepts/index.html.erb_spec.rb
enju_library-0.2.0.beta.4 spec/views/accepts/index.html.erb_spec.rb
enju_library-0.2.0.beta.3 spec/views/accepts/index.html.erb_spec.rb
enju_library-0.2.0.beta.2 spec/views/accepts/index.html.erb_spec.rb
enju_library-0.2.0.beta.1 spec/views/accepts/index.html.erb_spec.rb