{"action":"created","issue":{"url":"https://api.github.com/repos/emberjs/ember.js/issues/10784","labels_url":"https://api.github.com/repos/emberjs/ember.js/issues/10784/labels{/name}","comments_url":"https://api.github.com/repos/emberjs/ember.js/issues/10784/comments","events_url":"https://api.github.com/repos/emberjs/ember.js/issues/10784/events","html_url":"https://github.com/emberjs/ember.js/issues/10784","id":65510074,"number":10784,"title":"`currentURL()` result when at root has changed in Ember 1.12.0-beta.1","user":{"login":"backspace","id":43280,"avatar_url":"https://avatars.githubusercontent.com/u/43280?v=3","gravatar_id":"","url":"https://api.github.com/users/backspace","html_url":"https://github.com/backspace","followers_url":"https://api.github.com/users/backspace/followers","following_url":"https://api.github.com/users/backspace/following{/other_user}","gists_url":"https://api.github.com/users/backspace/gists{/gist_id}","starred_url":"https://api.github.com/users/backspace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/backspace/subscriptions","organizations_url":"https://api.github.com/users/backspace/orgs","repos_url":"https://api.github.com/users/backspace/repos","events_url":"https://api.github.com/users/backspace/events{/privacy}","received_events_url":"https://api.github.com/users/backspace/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/emberjs/ember.js/milestones/16","html_url":"https://github.com/emberjs/ember.js/milestones/1.12.0","labels_url":"https://api.github.com/repos/emberjs/ember.js/milestones/16/labels","id":983207,"number":16,"title":"1.12.0","description":"","creator":{"login":"mixonic","id":8752,"avatar_url":"https://avatars.githubusercontent.com/u/8752?v=3","gravatar_id":"","url":"https://api.github.com/users/mixonic","html_url":"https://github.com/mixonic","followers_url":"https://api.github.com/users/mixonic/followers","following_url":"https://api.github.com/users/mixonic/following{/other_user}","gists_url":"https://api.github.com/users/mixonic/gists{/gist_id}","starred_url":"https://api.github.com/users/mixonic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mixonic/subscriptions","organizations_url":"https://api.github.com/users/mixonic/orgs","repos_url":"https://api.github.com/users/mixonic/repos","events_url":"https://api.github.com/users/mixonic/events{/privacy}","received_events_url":"https://api.github.com/users/mixonic/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":1,"state":"open","created_at":"2015-02-17T17:03:52Z","updated_at":"2015-04-20T14:07:35Z","due_on":"2015-04-25T04:00:00Z","closed_at":null},"comments":7,"created_at":"2015-03-31T17:59:12Z","updated_at":"2015-05-02T21:48:14Z","closed_at":null,"body":"In short:\r\n\r\n    visit('/');\r\n\r\n    andThen(function() {\r\n      // Ember 1.11\r\n      console.log(currentURL()); // => '/'\r\n\r\n      // Ember 1.12.0-beta.1\r\n      console.log(currentURL()); // => '';\r\n    });\r\n\r\n\r\nWe have been developing an Ember CLI application on the 1.11 betas, so today I updated to the first 1.12 beta to try it out. Everything continued to work except a few acceptance test assertions about the `currentURL()`.\r\n\r\nPreviously, if the application was at `/`, `currentURL()` returned `/`. Now it returns an empty string. On other routes, it still returns a string with `/` at the beginning.\r\n\r\nWhen I run `ApplicationName.__container__.lookup('router:main').location.getURL()` in development, which I believe is the same code used by `currentURL()`, I get `/`. So this in-test behaviour seems incorrect to me.\r\n\r\nIt seemed infeasible to make a JSBin to demonstrate this since it’s only happening in tests, but I did create a [small demonstration Ember CLI application](https://github.com/backspace/ember-1-12-0-beta-1-currentURL/commits/master). I did verify that it’s still happening in the canary version.\r\n\r\nIt’s trivial to change our tests to look for an empty string instead of `/`, so if that’s the intended behaviour just let me know and I’ll update the tests so we can keep working with the betas."},"comment":{"url":"https://api.github.com/repos/emberjs/ember.js/issues/comments/98407546","html_url":"https://github.com/emberjs/ember.js/issues/10784#issuecomment-98407546","issue_url":"https://api.github.com/repos/emberjs/ember.js/issues/10784","id":98407546,"user":{"login":"saitheexplorer","id":3508056,"avatar_url":"https://avatars.githubusercontent.com/u/3508056?v=3","gravatar_id":"","url":"https://api.github.com/users/saitheexplorer","html_url":"https://github.com/saitheexplorer","followers_url":"https://api.github.com/users/saitheexplorer/followers","following_url":"https://api.github.com/users/saitheexplorer/following{/other_user}","gists_url":"https://api.github.com/users/saitheexplorer/gists{/gist_id}","starred_url":"https://api.github.com/users/saitheexplorer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saitheexplorer/subscriptions","organizations_url":"https://api.github.com/users/saitheexplorer/orgs","repos_url":"https://api.github.com/users/saitheexplorer/repos","events_url":"https://api.github.com/users/saitheexplorer/events{/privacy}","received_events_url":"https://api.github.com/users/saitheexplorer/received_events","type":"User","site_admin":false},"created_at":"2015-05-02T21:48:13Z","updated_at":"2015-05-02T21:48:13Z","body":"I' m seeing this too - \r\n\r\n```\r\ntest('visiting /', function (assert) {\r\n  visit('/');\r\n\r\n  andThen(function () {\r\n    assert.equal(currentURL(), '/', 'Index page is at root route');\r\n  });\r\n});\r\n```\r\nThis passes in 1.11.3, but fails in 1.12.0-beta.3."}}