Sha256: 1cad6a71e6d3df62f2372165830f29258b88918edc0411a746fb6d60453b3f99

Contents?: true

Size: 342 Bytes

Versions: 9

Compression:

Stored size: 342 Bytes

Contents

require 'rails_helper'

RSpec.describe "roles/index", type: :view do
  fixtures :roles
  before(:each) do
    assign(:roles, Role.all)
  end

  it "renders a list of roles" do
    allow(view).to receive(:policy).and_return double(update?: true, destroy?: true)
    render
    assert_select "tr>td", text: "Librarian".to_s, count: 2
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
enju_seed-0.3.6 spec/views/roles/index.html.erb_spec.rb
enju_seed-0.3.5 spec/views/roles/index.html.erb_spec.rb
enju_seed-0.4.0.rc.2 spec/views/roles/index.html.erb_spec.rb
enju_seed-0.3.4 spec/views/roles/index.html.erb_spec.rb
enju_seed-0.4.0.rc.1 spec/views/roles/index.html.erb_spec.rb
enju_seed-0.4.0.beta.3 spec/views/roles/index.html.erb_spec.rb
enju_seed-0.5.0.beta.1 spec/views/roles/index.html.erb_spec.rb
enju_seed-0.4.0.beta.2 spec/views/roles/index.html.erb_spec.rb
enju_seed-0.3.3 spec/views/roles/index.html.erb_spec.rb