25 Commits

Author SHA1 Message Date
Brad Dunbar
b75c4c52ee Merge branch 'master' into emulate-options
Conflicts:
	backbone.js
	test/sync.js
2012-11-02 17:05:29 -04:00
Brad Dunbar
aa4dd9de37 Add test for #1758. 2012-10-19 17:06:09 -04:00
Brad Dunbar
1d909d4fe0 Fix #1756 - preserve user provided beforeSend. 2012-10-19 16:08:40 -04:00
Brad Dunbar
ed5eb58d65 Use global emulate options as defaults.
* `sync` accepts `emulateHTTP` and `emulateJSON` as options.
* Use global options as defaults.
2012-09-14 08:40:07 -04:00
Brad Dunbar
33cdab412e Drop doubled test prefixes. 2012-09-05 08:52:27 -04:00
Brad Dunbar
8ef1730b73 Consolidate test boilerplate; use consistent names. 2012-08-31 11:39:34 -04:00
Brad Dunbar
f49272e19e Fix variable scope error, provide test. 2012-08-29 18:41:08 -04:00
Sam Breed
f4ebee0406 adding the expected argument to all tests 2012-06-02 18:07:11 -06:00
Brad Dunbar
70005fdd04 Update QUnit.
* Use `deepEqual` in place of `same`.
* Expect 0 tests where appropriate.
* Update view test to use #qunit-fixture.
* Remove `QUnit.config.reorder = false;`.
2012-05-02 20:54:27 -04:00
Brad Dunbar
87c9b17aa7 Fix #474 - Backbone.ajax 2012-04-11 08:33:20 -04:00
Aidan Feldman
f49969014c clean up tests to use fresh object instances for each run, and don't set
globals within test files
2012-03-12 04:27:22 -04:00
Brad Dunbar
111d5a1f19 Add a test for #1052. 2012-02-27 14:16:00 -05:00
Brad Dunbar
ec61503c87 fixes #928 - Save sends correct attrs.
* Temporarily set model's attrs for `sync`.
* Remove cross-module (global) dependencies in
  Collection, Model, and sync test modules.
2012-02-02 08:57:47 -05:00
Brad Dunbar
397d11e340 equals is deprecated; use equal instead
http://docs.jquery.com/QUnit/equal#actualexpectedmessage
2012-01-17 23:52:12 -05:00
Jeremy Ashkenas
cea56e523a Fixes #563. Initial draft of 'wait: true' for pessimistic instead of optimistic save() create() and destroy(). Makes it easier to have your asynchronous UI and eat it too. 2012-01-17 15:26:26 -05:00
Jeremy Ashkenas
222d673dcc Issue #289. Enable the use of jQuery.Deferred by returning Deferred objects from save() and fetch() calls. 2011-04-18 17:08:34 -04:00
Jeremy Ashkenas
1c308280c8 Updating to latest QUnit, fixing Issue #153 ... overly aggressive urlError. 2010-12-30 12:15:02 -05:00
Jeremy Ashkenas
3d8fe92f1e Issue #78. Changes the Backbone.sync API to enable passing through of options ... like {data} in fetch() 2010-12-13 10:15:09 -05:00
Jeremy Ashkenas
151417e7bc separating out emulateHTTP from emulateJSON, with tests. 2010-11-08 15:42:09 -05:00
Jeremy Ashkenas
d651d82e92 don't send any data up, if you're not sending any data up ... fixes destroy. 2010-11-02 13:48:10 -04:00
Jeremy Ashkenas
2d4ebd0271 Merging Issue #46. Use full JSON requests, falling back to encoded forms with emulateHttp. 2010-11-01 13:54:07 -04:00
John Wright
6c972695db Default behavior for Backbone.sync is now to send everything as application/json. Emulating http and sending data as form url-encoded can be turned on with Backbone.emulateHttp 2010-10-29 10:47:59 -06:00
John Wright
302c0d5cee Added Backbone.emulateJSON to enable the current behavior of syncing and made sending the body as application/json without a wrapping model param, the default 2010-10-28 20:21:59 -06:00
Jeremy Ashkenas
17d64e0a51 Adding Backbone.Model#fetch 2010-10-18 21:31:27 -04:00
Jeremy Ashkenas
7721f8481c adding Backbone.emulateHttp for frameworks that don't support HTTP. Issue #11 2010-10-17 10:53:40 -04:00