Commit Graph

233 Commits

Author SHA1 Message Date
Justin Ridgewell
7fb6f48966 Test case for model.id 2015-11-02 10:50:59 -05:00
Jordan Eldredge
95512b0692 Fix indentation in models test 2015-10-07 09:08:48 -07:00
Jordan Eldredge
9fb2f19764 Make implicit ;s in tests explicit 2015-10-07 07:52:35 -07:00
Kevin Partington
9c681906a4 Tests: Migrated unit tests to QUnit 2.0 syntax. (fixes #3813) 2015-10-06 23:35:30 -05:00
Justin Ridgewell
0c2953a0d8 Respect parse option in Model#fetch
Expand #3508 to cover `Model#fetch`
2015-05-23 12:58:35 -04:00
Justin Ridgewell
d7943fe4c0 Always call success async
Let's not [unleash
Zalgo](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony
).
2015-04-23 14:03:50 -04:00
Adam Krebs
499f6af3b9 allow Model#matches to take a predicate function 2015-02-19 09:39:00 -05:00
Adam Krebs
0df246e1f6 Merge pull request #3488 from platinumazure/include-updated-options-in-sync-callback
Include updated options in sync callbacks
2015-02-17 19:20:02 -05:00
Kevin Partington
b331afede1 Small style tweaks per akre54's comments on the pull request. 2015-02-17 19:13:19 -05:00
Yousef Cisco
2d041d799d Updated Model to allow configuration of the cid prefix 2015-02-12 17:16:55 +00:00
Kevin Partington
1088d18a21 Collection#fetch, Model#save, Model#fetch, and Model#destroy should all pass extra sync options to success callbacks. 2015-02-10 20:28:20 -06:00
Jeremy Ashkenas
377b9c89e4 Merge pull request #3485 from megawac/qunit-update
[minor] Update QUnit to v1.7.1
2015-02-10 10:47:20 -05:00
Graeme
1577524edd Update QUnit to v1.7.1 2015-02-10 00:31:04 -05:00
Stephen Thomas
0f2e968913 Add failing test for save and wait. 2015-02-05 07:33:25 -05:00
Justin Ridgewell
c2b2a71c29 Call the success callback with context
Fixes https://github.com/jashkenas/backbone/issues/3283.
2014-12-22 12:01:28 -05:00
Gianni Chiappetta
f79885531a Add Model::matches as special-cased proxy to _.matches 2014-09-11 13:10:30 -04:00
Adam Krebs
ac384b2c1e test for attributes set on the model correctly in patch save 2014-07-23 11:38:36 -04:00
Adam Krebs
2deb84a982 allow Model#save with patch: true to take different attrs. Fixes #3232 2014-07-23 09:47:29 -04:00
Adam Krebs
c33dcdeffd Merge branch 'method-chain' from akre54/method-chain 2014-05-27 14:52:11 -04:00
Adam Krebs
ce6780877f add Model#chain back in. closes gh-3161 2014-05-27 14:51:50 -04:00
Casey Foster
11cc0e863f Revert "Make new tests more thorough"
This reverts commit f814b85db6.

Revert "Return `id` assumption for simple polymorphic `Collection#model` factories."

This reverts commit 3f7fbdeec6.

Conflicts:
	test/collection.js

Revert "#2985 -- use 'change-id' as the event name"

This reverts commit 36e4925b9c.

Revert "Merge pull request #2985 from caseywebdev/generate-id"

This reverts commit 60b9cc1d18, reversing
changes made to 0c1838be63.

Conflicts:
	test/collection.js
2014-04-23 12:02:09 -05:00
Casey Foster
5bc7333a2a Re #2976 Allow id values to be generated from a function given attrs 2014-02-27 10:55:53 -06:00
Casey Foster
47331efca8 Fix #2846 nested "change" events trigger with correct options 2013-11-06 14:38:41 -06: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
Casey Foster
4db2676477 Don't validate twice in 2013-03-29 14:16:00 -05:00
Casey Foster
8e7208e0d8 Fix #2446 save should always set with validate: true by default 2013-03-29 13:46:17 -05:00
Genadi Samokovarov
3bfbcd4123 Don't accept urlRoot from Model and url from Collection 2013-03-25 23:07:46 +02:00
Genadi Samokovarov
e91b36c0cb Don't attach url if passed as an option in Model 2013-03-23 19:34:27 +02:00
Jeremy Ashkenas
fe251a477d Restoring model.set() with 'silent' 2013-03-20 12:01:53 +08:00
Jeremy Ashkenas
4ab7d055c0 Merge pull request #2391 from tgriesser/model-options
Attaching url and urlRoot on the model if passed
2013-03-19 17:17:57 -07:00
Jeremy Ashkenas
155bd064a9 Revert "Removing HTTP PATCH support from Backbone. Revert this commit as soon as jQuery supports PATCH."
This reverts commit 46bf8c8197.
2013-03-20 07:41:21 +08:00
Tim Griesser
b490e477f7 attaching url and urlRoot on the model if passed 2013-03-19 15:36:00 -04:00
Jeremy Ashkenas
83eb26f971 removing some underscore model methods, adding others 2013-03-19 20:07:53 +08:00
Jeremy Ashkenas
4e3f923f83 Merge pull request #2082 from akre54/underscore-methods-on-model-2
Add underscore methods (map, keys, values) to models
2013-03-19 05:02:45 -07:00
Jeremy Ashkenas
46bf8c8197 Removing HTTP PATCH support from Backbone. Revert this commit as soon as jQuery supports PATCH. 2013-03-19 19:37:51 +08:00
Tim Griesser
97c36b0bce Merge pull request #2113 from braddunbar/silent
Remove silent option from Model#set.
2013-02-28 09:46:53 -08:00
Tim Griesser
61276ccbe9 Merge pull request #2282 from DreamTheater/patch-1
Fixed to pass with edge version of Underscore
2013-02-26 03:27:26 -08:00
Adam Krebs
87c359c893 remove map, contains, and pairs methods from Model 2013-02-25 10:25:09 -05:00
Dillon Forrest
e3511786d3 Tweak .parse(opt) to be .parse(attrs) for descriptiveness. 2013-02-21 18:30:30 -05:00
Dmytro Nemoga
8e3c38a19f Update due to recomendations 2013-02-20 10:01:53 +02:00
Dmytro Nemoga
0a085bddc9 Fixed to pass with edge version of Underscore
Due to changes in 0ab5bdccd4 need to fix Backbone.Model test. It would be helpful because some people may use Backbone's unit tests in their Backbone-related projects (plugins for example).
2013-02-17 02:32:10 +02:00
Casey Foster
3648aa48e7 Revert "Really fix #2269, remove circular reference."
This reverts commit 43544ca59e.
2013-02-15 07:22:42 -08:00
Casey Foster
43544ca59e Really fix #2269, remove circular reference.
...

...

...

...
2013-02-14 16:16:55 -08:00
brad dunbar
0a70b3953c Semicolon. 2013-02-04 11:29:45 -05:00
Tim Griesser
b1575f72a6 adding tests for error event on all sync methods 2013-01-31 13:34:35 -05:00
Tim Griesser
6e646f1ba7 making error/success handlers promise compatible 2013-01-30 23:41:05 -05:00
Brad Dunbar
5f522c74b7 Remove silent option from Model#set. 2013-01-22 12:23:35 -05:00
Casey Foster
975a44a6f1 Consistently turn on parse flag in save, like fetch already does 2013-01-11 08:20:57 -08:00
Adam Krebs
8753649652 Add keys, values, pairs, invert, pick, omit, each, and other
underscore methods to models
2013-01-06 18:56:20 -05:00