Sha256: 82ef5c4280e39f908b3ffe8d22d586d9ea7fe148f5d0db4ef7670c97e0ee3348
Contents?: true
Size: 862 Bytes
Versions: 2
Compression:
Stored size: 862 Bytes
Contents
require 'spec_helper' describe "profiles/show" do fixtures :all before(:each) do @profile = assign(:profile, profiles(:admin)) view.stub(:current_user).and_return(User.friendly.find('enjuadmin')) end it "renders attributes in <p>" do allow(view).to receive(:policy).and_return double(update?: true, destroy?: true) render # Run the generator again with the --webrat flag if you want to use webrat matchers rendered.should match(/Checkout/) end describe "when logged in as Librarian" do before(:each) do @profile = assign(:profile, profiles(:librarian2)) user = users(:librarian1) view.stub(:current_user).and_return(user) end it "cannot be deletable by other librarian" do allow(view).to receive(:policy).and_return double(update?: true, destroy?: true) render end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
enju_seed-0.2.0.beta.3 | spec/views/profiles/show.html.erb_spec.rb |
enju_seed-0.2.0.beta.2 | spec/views/profiles/show.html.erb_spec.rb |