Sha256: fdb7be93e1036d558ac9af90b02c4a69c31df191f499bad570123e936139a455

Contents?: true

Size: 1.19 KB

Versions: 3

Compression:

Stored size: 1.19 KB

Contents

require 'spec_helper'

describe "Routes for batch_update" do
  it "should route index" do 
    { :get => '/batch_edits' }.should route_to( :controller => "batch_edits", :action => "index")
    batch_edits_path.should == '/batch_edits'
  end
  it "should route edit" do 
    { :get => edit_batch_edits_path }.should route_to( :controller => "batch_edits", :action => "edit")
  end
  it "should route update" do 
    { :put => batch_edits_path }.should route_to( :controller => "batch_edits", :action => "update")
  end
  it "should route delete batch" do 
    { :delete => batch_edits_path }.should route_to( :controller => "batch_edits", :action => "destroy_collection")
  end
  it "should route add" do 
    { :put => '/batch_edits/7'}.should route_to( :controller => "batch_edits", :action => "add", :id=>'7')
  end
  it "should route delete" do 
    { :delete => '/batch_edits/7' }.should route_to( :controller => "batch_edits", :action => "destroy", :id=>'7')
    batch_edit_path(7).should == "/batch_edits/7"
  end

  it "should route all" do 
    { :put => '/batch_edits/all'}.should route_to( :controller => "batch_edits", :action => "all")
    all_batch_edits_path.should == "/batch_edits/all"
  end


end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
hydra-batch-edit-1.1.1 spec/routing/batch_edit_routes_spec.rb
hydra-batch-edit-1.1.0 spec/routing/batch_edit_routes_spec.rb
hydra-batch-edit-1.0.2 spec/routing/batch_edit_routes_spec.rb