Permalink
Browse files

Test case to demonstrate resources->controller feature, closes #23

  • Loading branch information...
1 parent 2d10b8c commit 25e68cdec90fb5760772796cd46956aac2cdd0b6 @1602 committed Jul 10, 2013
Showing with 9 additions and 0 deletions.
  1. +9 −0 test/routes.test.js
View
@@ -266,3 +266,12 @@ test('should filter resources when only specified', function() {
paths[2][2].should.equal('users#new');
paths[3][2].should.equal('users#show');
});
+
+test('should override controller name using resources->controller', function() {
+ map.resources('links', {only: 'show', controller: 'collectionLinks'});
+ map.namespace('collection', function(controller) {
+ map.resources('links', {only: 'show', controller: 'collectionLinks'});
+ });
+ paths[0][2].should.equal('collectionLinks#show');
+ paths[1][2].should.equal('collection/collectionLinks#show');
+});

0 comments on commit 25e68cd

Please sign in to comment.