Sha256: 6b1aa4260f75dcf598e70114dda15320d10a87b04857e205025d7bcf21bf5dc7

Contents?: true

Size: 867 Bytes

Versions: 21

Compression:

Stored size: 867 Bytes

Contents

require 'rails_helper'

describe "budget_types/index" do
  before(:each) do
    assign(:budget_types, [
      stub_model(BudgetType,
        name: "public_funds",
        display_name: "Public funds",
        note: "MyText",
        position: 1
      ),
      stub_model(BudgetType,
        name: "donation",
        display_name: "Donation",
        note: "MyText",
        position: 2
      )
    ])
  end

  it "renders a list of budget_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", text: "Public funds".to_s, count: 1
    # Run the generator again with the --webrat flag if you want to use webrat matchers
    assert_select "tr>td", text: "MyText".to_s, count: 2
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

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