38 Commits

Author SHA1 Message Date
Adam Krebs
55bab76349 Upgrade Qunit to 2.0, auto-convert tests using apsdehal/qunit-migrate 2016-06-20 16:04:30 -04:00
Craig Martin
e0a5cc75ba eliminate shadowed variable declarations
Also, add eslint rule no-shadow to enforce
2016-01-19 12:34:08 -05:00
Jordan Eldredge
89d50840b6 Add ESLint rule: dot-notation 2015-12-28 21:09:44 -08:00
Jordan Eldredge
d91405d54f Enable ESLint rule: 'quotes' for tests
These changes were done automatically by ESLint's `--fix` tag. Thanks ESLint!
2015-12-18 13:27:48 -08:00
Jordan Eldredge
2ae117a7cb Add ESLint rule: key-spacing 2015-12-16 10:00:19 -08:00
Kevin Partington
9c681906a4 Tests: Migrated unit tests to QUnit 2.0 syntax. (fixes #3813) 2015-10-06 23:35:30 -05:00
Graeme
1577524edd Update QUnit to v1.7.1 2015-02-10 00:31:04 -05:00
Brad Dunbar
cbaa8d144b Pass along textStatus and errorThrown. 2014-03-06 17:07:53 -05:00
Adam Krebs
2bd5df99c5 remove $(document).ready(...) from tests 2013-09-16 10:51:32 -04:00
Brad Dunbar
09259964df QUnit 1.12.0 2013-07-03 11:03:19 -04:00
Brad Dunbar
dc5de0190e Revert non-model sync commits.
Revert "Allow non-model object as second argument, with test."
This reverts commit 32743e6b60.

Revert "trigger request event only if model extends Backbone.Events, and fix whitespace"
This reverts commit 6d72e1be35.

Revert "add if statement and add passing test"
This reverts commit 2caf748651.
2013-04-22 11:22:23 -04:00
Tim Griesser
32743e6b60 Allow non-model object as second argument, with test. 2013-04-21 21:02:37 -04:00
Rune Skjoldborg Madsen
2caf748651 add if statement and add passing test 2013-04-21 20:23:25 -04:00
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