Sha256: afabfd5dc566811f528bce50e9421509224f1efd56680b9eeec1f01b0afc67ce

Contents?: true

Size: 825 Bytes

Versions: 13

Compression:

Stored size: 825 Bytes

Contents

require 'rails_helper'

describe "checkouts/edit" do
  fixtures :checkouts, :users, :user_has_roles, :roles

  before(:each) do
    @checkout = assign(:checkout, checkouts(:checkout_00001))
    assign(:new_due_date, 1.day.from_now)
    assign(:library_group, LibraryGroup.site_config)
    view.stub(:current_user).and_return(User.find_by(username: 'enjuadmin'))
  end

  it "renders the edit checkout form" do
    render

    # Run the generator again with the --webrat flag if you want to use webrat matchers
    assert_select "form", action: checkouts_path(@checkout), method: "post" do
      assert_select "input#checkout_user_id", name: "checkout[user_id]"
      assert_select "input#checkout_item_id", name: "checkout[item_id]"
      assert_select "input#checkout_due_date", name: "checkout[due_date]"
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

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