spec_app/spec/javascripts/up/popup_spec.js.coffee in unpoly-rails-0.36.0 vs spec_app/spec/javascripts/up/popup_spec.js.coffee in unpoly-rails-0.36.1
- old
+ new
@@ -133,11 +133,11 @@
expect(up.popup.coveredUrl()).toBeMissing()
$popupLink = affix('a[href="/bar"][up-popup=".container"][up-history="true"]')
Trigger.clickSequence($popupLink)
@respondWith('<div class="container">text</div>')
- expect(up.popup.coveredUrl()).toEndWith('/foo')
+ expect(up.popup.coveredUrl()).toEqualUrl('/foo')
up.popup.close().then ->
expect(up.popup.coveredUrl()).toBeMissing()
done()
describe 'up.popup.close', ->
@@ -340,10 +340,10 @@
whenPopupOpen.then ->
up.extract('.outside', "<div class='outside'>new outside</div>",
origin: $('.inside'), history: '/new-location') # Provoke auto-close
u.setTimer 50, ->
- expect(location.href).toEndWith '/new-location'
+ expect(location.href).toEqualUrl '/new-location'
done()
it 'does not auto-close the popup when a replacement from inside the popup affects a selector inside the popup', ->
affix('.outside').text('old outside')
$link = affix('.link')