Sha256: ac2bc8e000e4cd54ea5dbd11831b314f943a1e8f1dc1aa5a20363c891e5b84d9

Contents?: true

Size: 584 Bytes

Versions: 5

Compression:

Stored size: 584 Bytes

Contents

require 'spec_helper'

describe 'profiles/index' do
  fixtures :all

  before(:each) do
    assign(:profiles, Profile.page(1))
    admin = User.friendly.find('enjuadmin')
    view.stub(:current_user).and_return(admin)
    view.stub(:params).and_return(ActionController::Parameters.new)
  end

  it 'renders a list of profiles' 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: 'enjuadmin'
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
enju_seed-0.4.0.beta.1 spec/views/profiles/index.html.erb_spec.rb
enju_seed-0.3.0.beta.4 spec/views/profiles/index.html.erb_spec.rb
enju_seed-0.3.0.beta.3 spec/views/profiles/index.html.erb_spec.rb
enju_seed-0.3.0.beta.2 spec/views/profiles/index.html.erb_spec.rb
enju_seed-0.3.0.beta.1 spec/views/profiles/index.html.erb_spec.rb