Skip to content

Commit

Permalink
base_url in the relative url
Browse files Browse the repository at this point in the history
  • Loading branch information
Matteo Giachino committed Jun 17, 2014
1 parent 15b327c commit ae6600c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Resources/coffee/ng-router.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class cypress.NgRouter
host = @findRoute(routeName)?.getHost()
return "#{cypress.NgRouter.scheme}://#{host}#{cypress.NgRouter.baseUrl}#{path}"
else
return path
return "#{cypress.NgRouter.baseUrl}#{path}"

findRoute: (routeName) ->
matchedRoute = null
Expand Down
2 changes: 1 addition & 1 deletion Resources/public/ng-router.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Resources/test/spec/ng-router.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ describe 'cypress.NgRouter', ->
expect(ngRouter.generateResourceUrl('test')).toBe('scheme://host/base_url/test/:id')

it 'should generate a route by its name, without the absolute path', ->
expect(ngRouter.generateResourceUrl('test', false)).toBe('/test/:id')
expect(ngRouter.generateResourceUrl('test', false)).toBe('/base_url/test/:id')

it 'should have a generateResourceUrl method', ->
expect(ngRouter.generateResourceUrl).toBeDefined()
Expand Down

0 comments on commit ae6600c

Please sign in to comment.