Sha256: 407ba08de4c0f475831b25bf564c886c39a8620b40d78e3789846675d69cd458

Contents?: true

Size: 829 Bytes

Versions: 14

Compression:

Stored size: 829 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.where(username: 'enjuadmin').first)
  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

14 entries across 14 versions & 1 rubygems

Version Path
enju_circulation-0.3.3 spec/views/checkouts/edit.html.erb_spec.rb
enju_circulation-0.3.2 spec/views/checkouts/edit.html.erb_spec.rb
enju_circulation-0.3.1 spec/views/checkouts/edit.html.erb_spec.rb
enju_circulation-0.3.0 spec/views/checkouts/edit.html.erb_spec.rb
enju_circulation-0.3.0.rc.1 spec/views/checkouts/edit.html.erb_spec.rb
enju_circulation-0.3.0.beta.1 spec/views/checkouts/edit.html.erb_spec.rb
enju_circulation-0.2.5 spec/views/checkouts/edit.html.erb_spec.rb
enju_circulation-0.2.4 spec/views/checkouts/edit.html.erb_spec.rb
enju_circulation-0.2.3 spec/views/checkouts/edit.html.erb_spec.rb
enju_circulation-0.2.2 spec/views/checkouts/edit.html.erb_spec.rb
enju_circulation-0.2.1 spec/views/checkouts/edit.html.erb_spec.rb
enju_circulation-0.2.0 spec/views/checkouts/edit.html.erb_spec.rb
enju_circulation-0.2.0.beta.4 spec/views/checkouts/edit.html.erb_spec.rb
enju_circulation-0.2.0.beta.3 spec/views/checkouts/edit.html.erb_spec.rb