Sha256: 7fc3904fd54396d5ce880e234e8ee9260f7a765d57cc3705473a4f08a4a2647d

Contents?: true

Size: 878 Bytes

Versions: 19

Compression:

Stored size: 878 Bytes

Contents

require 'rails_helper'

describe "checkouts/show" do
  fixtures :checkouts, :users, :user_has_roles, :roles, :profiles

  before(:each) do
    @checkout = assign(:checkout, stub_model(Checkout,
                                             user_id: 2,
                                             item_id: 1
    ))
    assign(:library_group, LibraryGroup.site_config)
    I18n.locale = :en
    view.stub(:current_user).and_return(User.where(username: 'enjuadmin').first)
  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(/Due date/)
    # Run the generator again with the --webrat flag if you want to use webrat matchers
    rendered.should match(/Item identifier/)
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

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