spec_app/spec/javascripts/up/proxy_spec.js.coffee in unpoly-rails-0.25.0 vs spec_app/spec/javascripts/up/proxy_spec.js.coffee in unpoly-rails-0.25.1
- old
+ new
@@ -81,9 +81,14 @@
it "doesn't reuse responses when asked for the same path, but different selectors", ->
up.ajax(url: '/path', target: '.a')
up.ajax(url: '/path', target: '.b')
expect(jasmine.Ajax.requests.count()).toEqual(2)
+ it "doesn't reuse responses when asked for the same path, but different params", ->
+ up.ajax(url: '/path', data: { query: 'foo' })
+ up.ajax(url: '/path', data: { query: 'bar' })
+ expect(jasmine.Ajax.requests.count()).toEqual(2)
+
it "reuses a response for an 'html' selector when asked for the same path and any other selector", ->
up.ajax(url: '/path', target: 'html')
up.ajax(url: '/path', target: 'body')
up.ajax(url: '/path', target: 'p')
up.ajax(url: '/path', target: '.klass')