Sha256: 50910f0ab68478b44f27ceb43ddf15fd919a1310ed13fb75b1d5b6e2e5ac6356

Contents?: true

Size: 672 Bytes

Versions: 6

Compression:

Stored size: 672 Bytes

Contents

require "spec_helper"

describe "routing" do
  
  context "admin users" do
    before(:each) { @routes = Citygate::Engine.routes }
    
    it "should have a route to list the users in html" do
      { get: admin_users_path }.should route_to({controller: "citygate/admin/users", action: "index"})
    end
    
    it "should have a route to list the users in json" do
      { get: admin_users_path(format: "json") }.should route_to({controller: "citygate/admin/users", action: "index", format: "json"})
    end
    
    it "should not have a route to list the users in xml" do
      { get: admin_users_path(format: "xml") }.should_not be_routable
    end
    
  end
  
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
citygate-0.1.1 spec/dummy/spec/routing/routing_spec.rb
citygate-0.1.0 spec/dummy/spec/routing/routing_spec.rb
citygate-0.0.9 spec/dummy/spec/routing/routing_spec.rb
citygate-0.0.8 spec/dummy/spec/routing/routing_spec.rb
citygate-0.0.7 spec/dummy/spec/routing/routing_spec.rb
citygate-0.0.6 spec/dummy/spec/routing/routing_spec.rb