ember-data-source 1.13.4 → 1.13.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/dist/ember-data-tests.js +227 -95
- data/dist/ember-data.js +200 -131
- data/dist/ember-data.js.map +1 -1
- data/dist/ember-data.min.js +4 -4
- data/dist/ember-data.prod.js +185 -136
- data/package.json +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f831525fdcf65ff5cf7c35181eb06c4262224558
|
4
|
+
data.tar.gz: c102fcd43f2ac52808268bc3cb16077e77fc6ff5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c74369d2d49d46ce7d5c721e2c6ad432b7fef68015f876a194906168ea55e5fded8fb24338d8c19b04b1b832482fe0be0ca4a89b3714f024782c75ea4e1f05a
|
7
|
+
data.tar.gz: 2f3f500fdd2e6ebb4dc84e6f92ef22797273f22fe085392d2532d6f59414b4a88ffd317a944c6fc62751d91dd755f617acd904329064fb86c151b2525e22bc4e
|
data/dist/ember-data-tests.js
CHANGED
@@ -196,7 +196,7 @@ define(
|
|
196
196
|
|
197
197
|
var error = adapter.handleResponse(jqXHR.status, {}, json).errors[0];
|
198
198
|
|
199
|
-
equal(error.
|
199
|
+
equal(error.detail, 'can\'t be blank');
|
200
200
|
equal(error.source.pointer, 'data/attributes/name');
|
201
201
|
});
|
202
202
|
|
@@ -1201,7 +1201,7 @@ define(
|
|
1201
1201
|
source: {
|
1202
1202
|
pointer: 'data/attributes/first_name'
|
1203
1203
|
},
|
1204
|
-
|
1204
|
+
detail: 'firstName not evil enough'
|
1205
1205
|
}]
|
1206
1206
|
};
|
1207
1207
|
|
@@ -2818,6 +2818,39 @@ define(
|
|
2818
2818
|
});
|
2819
2819
|
});
|
2820
2820
|
});
|
2821
|
+
|
2822
|
+
test('fetching a belongsTo relationship link that returns null', function () {
|
2823
|
+
expect(3);
|
2824
|
+
|
2825
|
+
ajaxResponse([{
|
2826
|
+
data: {
|
2827
|
+
type: 'post',
|
2828
|
+
id: '1',
|
2829
|
+
attributes: {
|
2830
|
+
title: 'Ember.js rocks'
|
2831
|
+
},
|
2832
|
+
relationships: {
|
2833
|
+
author: {
|
2834
|
+
links: {
|
2835
|
+
related: 'http://example.com/post/1/author'
|
2836
|
+
}
|
2837
|
+
}
|
2838
|
+
}
|
2839
|
+
}
|
2840
|
+
}, {
|
2841
|
+
data: null
|
2842
|
+
}]);
|
2843
|
+
|
2844
|
+
run(function () {
|
2845
|
+
store.find('post', 1).then(function (post) {
|
2846
|
+
equal(passedUrl[0], '/posts/1');
|
2847
|
+
return post.get('author');
|
2848
|
+
}).then(function (author) {
|
2849
|
+
equal(passedUrl[1], 'http://example.com/post/1/author');
|
2850
|
+
equal(author, null);
|
2851
|
+
});
|
2852
|
+
});
|
2853
|
+
});
|
2821
2854
|
}
|
2822
2855
|
);
|
2823
2856
|
|
@@ -3251,6 +3284,8 @@ define(
|
|
3251
3284
|
__exports__[name] = value;
|
3252
3285
|
}
|
3253
3286
|
|
3287
|
+
var keysFunc = Object.keys || Ember.keys;
|
3288
|
+
|
3254
3289
|
var env, store, adapter, Post, Comment, SuperUser;
|
3255
3290
|
var passedUrl, passedVerb, passedHash;
|
3256
3291
|
var run = Ember.run;
|
@@ -4158,7 +4193,7 @@ define(
|
|
4158
4193
|
passedVerb = verb;
|
4159
4194
|
passedHash = hash;
|
4160
4195
|
|
4161
|
-
deepEqual(
|
4196
|
+
deepEqual(keysFunc(hash.data), ["in", "order", "params", "wrong"], "query params are received in alphabetical order");
|
4162
4197
|
|
4163
4198
|
return run(Ember.RSVP, "resolve", { posts: [{ id: 1, name: "Rails is very expensive sushi" }] });
|
4164
4199
|
};
|
@@ -4186,7 +4221,7 @@ define(
|
|
4186
4221
|
passedVerb = verb;
|
4187
4222
|
passedHash = hash;
|
4188
4223
|
|
4189
|
-
deepEqual(
|
4224
|
+
deepEqual(keysFunc(hash.data), ["params", "in", "wrong", "order"], "query params are received in their original order");
|
4190
4225
|
|
4191
4226
|
return run(Ember.RSVP, "resolve", { posts: [{ id: 1, name: "Rails is very expensive sushi" }] });
|
4192
4227
|
};
|
@@ -4202,13 +4237,13 @@ define(
|
|
4202
4237
|
passedVerb = verb;
|
4203
4238
|
passedHash = hash;
|
4204
4239
|
|
4205
|
-
deepEqual(
|
4240
|
+
deepEqual(keysFunc(hash.data), ["wrong", "params", "order", "in"], "query params are received in reverse alphabetical order");
|
4206
4241
|
|
4207
4242
|
return run(Ember.RSVP, "resolve", { posts: [{ id: 1, name: "Rails is very expensive sushi" }] });
|
4208
4243
|
};
|
4209
4244
|
|
4210
4245
|
adapter.sortQueryParams = function (obj) {
|
4211
|
-
var sortedKeys =
|
4246
|
+
var sortedKeys = keysFunc(obj).sort().reverse();
|
4212
4247
|
var len = sortedKeys.length;
|
4213
4248
|
var newQueryParams = {};
|
4214
4249
|
|
@@ -4981,7 +5016,7 @@ define(
|
|
4981
5016
|
try {
|
4982
5017
|
run(function () {
|
4983
5018
|
store.find("post", "1")["catch"](function (err) {
|
4984
|
-
equal(err.errors[0].
|
5019
|
+
equal(err.errors[0].detail, errorThrown);
|
4985
5020
|
ok(err, "promise rejected");
|
4986
5021
|
});
|
4987
5022
|
});
|
@@ -6085,6 +6120,64 @@ define(
|
|
6085
6120
|
store.findAll('person', { adapterOptions: { query: { embed: true } } });
|
6086
6121
|
});
|
6087
6122
|
});
|
6123
|
+
|
6124
|
+
test('Store does not error when the serializer is null', function () {
|
6125
|
+
adapter.findRecord = function (store, type, query, recordArray) {
|
6126
|
+
return {
|
6127
|
+
id: 1,
|
6128
|
+
name: 'Mickael Ramírez'
|
6129
|
+
};
|
6130
|
+
};
|
6131
|
+
|
6132
|
+
adapter.serializer = null;
|
6133
|
+
|
6134
|
+
run(store, 'findRecord', 'person', 1).then(async(function (person) {
|
6135
|
+
equal(person.get('id'), 1);
|
6136
|
+
}));
|
6137
|
+
});
|
6138
|
+
|
6139
|
+
test('An async hasMany relationship with links should not trigger shouldBackgroundReloadRecord', function () {
|
6140
|
+
var Post = DS.Model.extend({
|
6141
|
+
name: DS.attr('string'),
|
6142
|
+
comments: DS.hasMany('comment', { async: true })
|
6143
|
+
});
|
6144
|
+
|
6145
|
+
var Comment = DS.Model.extend({
|
6146
|
+
name: DS.attr('string')
|
6147
|
+
});
|
6148
|
+
|
6149
|
+
env = setupStore({
|
6150
|
+
post: Post,
|
6151
|
+
comment: Comment,
|
6152
|
+
adapter: DS.RESTAdapter.extend({
|
6153
|
+
findRecord: function () {
|
6154
|
+
return {
|
6155
|
+
posts: {
|
6156
|
+
id: 1,
|
6157
|
+
name: 'Rails is omakase',
|
6158
|
+
links: { comments: '/posts/1/comments' }
|
6159
|
+
}
|
6160
|
+
};
|
6161
|
+
},
|
6162
|
+
findHasMany: function () {
|
6163
|
+
return Ember.RSVP.resolve({
|
6164
|
+
comments: [{ id: 1, name: 'FIRST' }, { id: 2, name: 'Rails is unagi' }, { id: 3, name: 'What is omakase?' }]
|
6165
|
+
});
|
6166
|
+
},
|
6167
|
+
shouldBackgroundReloadRecord: function () {
|
6168
|
+
ok(false, 'shouldBackgroundReloadRecord should not be called');
|
6169
|
+
}
|
6170
|
+
})
|
6171
|
+
});
|
6172
|
+
|
6173
|
+
store = env.store;
|
6174
|
+
|
6175
|
+
run(store, 'find', 'post', '1').then(async(function (post) {
|
6176
|
+
return post.get('comments');
|
6177
|
+
})).then(async(function (comments) {
|
6178
|
+
equal(comments.get('length'), 3);
|
6179
|
+
}));
|
6180
|
+
});
|
6088
6181
|
}
|
6089
6182
|
);
|
6090
6183
|
|
@@ -6271,6 +6364,29 @@ define(
|
|
6271
6364
|
ok(ran, 'ember-data initializer was found');
|
6272
6365
|
});
|
6273
6366
|
|
6367
|
+
test('ember-data initializer does not register the store service when it was already registered', function () {
|
6368
|
+
|
6369
|
+
var AppStore = Store.extend({
|
6370
|
+
isCustomStore: true
|
6371
|
+
});
|
6372
|
+
|
6373
|
+
App.initializer({
|
6374
|
+
name: 'after-ember-data',
|
6375
|
+
before: 'ember-data',
|
6376
|
+
initialize: function (registry) {
|
6377
|
+
registry.register('service:store', AppStore);
|
6378
|
+
}
|
6379
|
+
});
|
6380
|
+
|
6381
|
+
run(function () {
|
6382
|
+
app = App.create();
|
6383
|
+
container = app.__container__;
|
6384
|
+
});
|
6385
|
+
|
6386
|
+
var store = getStore();
|
6387
|
+
ok(store && store.get('isCustomStore'), 'ember-data initializer does not overwrite the previous registered service store');
|
6388
|
+
});
|
6389
|
+
|
6274
6390
|
test('store initializer is run (DEPRECATED)', function () {
|
6275
6391
|
var ran = false;
|
6276
6392
|
App.initializer({
|
@@ -8850,6 +8966,8 @@ define(
|
|
8850
8966
|
__exports__[name] = value;
|
8851
8967
|
}
|
8852
8968
|
|
8969
|
+
var keysFunc = Object.keys || Ember.keys;
|
8970
|
+
|
8853
8971
|
var attr = DS.attr;
|
8854
8972
|
var belongsTo = DS.belongsTo;
|
8855
8973
|
var hasMany = DS.hasMany;
|
@@ -8963,7 +9081,7 @@ define(
|
|
8963
9081
|
test('Unloading all records for a given type clears saved meta data.', function () {
|
8964
9082
|
|
8965
9083
|
function metadataKeys(type) {
|
8966
|
-
return
|
9084
|
+
return keysFunc(env.store.metadataFor(type));
|
8967
9085
|
}
|
8968
9086
|
|
8969
9087
|
run(function () {
|
@@ -13557,7 +13675,7 @@ define(
|
|
13557
13675
|
}
|
13558
13676
|
}));
|
13559
13677
|
|
13560
|
-
var serializer = env.
|
13678
|
+
var serializer = env.store.serializerFor('home-planet');
|
13561
13679
|
var json_hash = {
|
13562
13680
|
homePlanet: {
|
13563
13681
|
id: '1',
|
@@ -13614,7 +13732,7 @@ define(
|
|
13614
13732
|
}));
|
13615
13733
|
env.registry.register('serializer:evil-minion', TestSerializer);
|
13616
13734
|
|
13617
|
-
var serializer = env.
|
13735
|
+
var serializer = env.store.serializerFor('home-planet');
|
13618
13736
|
var json_hash = {
|
13619
13737
|
homePlanet: {
|
13620
13738
|
id: '1',
|
@@ -13680,7 +13798,7 @@ define(
|
|
13680
13798
|
}
|
13681
13799
|
}));
|
13682
13800
|
|
13683
|
-
var serializer = env.
|
13801
|
+
var serializer = env.store.serializerFor('comment');
|
13684
13802
|
var json_hash = {
|
13685
13803
|
comment: {
|
13686
13804
|
id: '1',
|
@@ -13744,7 +13862,7 @@ define(
|
|
13744
13862
|
}
|
13745
13863
|
}));
|
13746
13864
|
|
13747
|
-
var serializer = env.
|
13865
|
+
var serializer = env.store.serializerFor('comment');
|
13748
13866
|
var json_hash = {
|
13749
13867
|
comment: {
|
13750
13868
|
id: '1',
|
@@ -13831,7 +13949,7 @@ define(
|
|
13831
13949
|
}));
|
13832
13950
|
env.registry.register('serializer:super-villain', TestSerializer);
|
13833
13951
|
|
13834
|
-
var serializer = env.
|
13952
|
+
var serializer = env.store.serializerFor('home-planet');
|
13835
13953
|
var json_hash = {
|
13836
13954
|
homePlanet: {
|
13837
13955
|
id: '1',
|
@@ -13914,7 +14032,7 @@ define(
|
|
13914
14032
|
}));
|
13915
14033
|
env.registry.register('serializer:super-villain', TestSerializer);
|
13916
14034
|
|
13917
|
-
var serializer = env.
|
14035
|
+
var serializer = env.store.serializerFor('home-planet');
|
13918
14036
|
|
13919
14037
|
var json_hash = {
|
13920
14038
|
homePlanets: [{
|
@@ -13970,7 +14088,7 @@ define(
|
|
13970
14088
|
}
|
13971
14089
|
}));
|
13972
14090
|
|
13973
|
-
var serializer = env.
|
14091
|
+
var serializer = env.store.serializerFor('home-planet');
|
13974
14092
|
|
13975
14093
|
var json_hash = {
|
13976
14094
|
homePlanets: [{
|
@@ -14028,7 +14146,7 @@ define(
|
|
14028
14146
|
}));
|
14029
14147
|
env.registry.register('serializer:super-villain', TestSerializer);
|
14030
14148
|
|
14031
|
-
var serializer = env.
|
14149
|
+
var serializer = env.store.serializerFor('home-planet');
|
14032
14150
|
|
14033
14151
|
var json_hash = {
|
14034
14152
|
homePlanets: [{
|
@@ -14079,7 +14197,7 @@ define(
|
|
14079
14197
|
}
|
14080
14198
|
}));
|
14081
14199
|
|
14082
|
-
var serializer = env.
|
14200
|
+
var serializer = env.store.serializerFor('comment');
|
14083
14201
|
|
14084
14202
|
var json_hash = {
|
14085
14203
|
comments: [{
|
@@ -14151,7 +14269,7 @@ define(
|
|
14151
14269
|
}));
|
14152
14270
|
env.registry.register('serializer:super-villain', TestSerializer);
|
14153
14271
|
|
14154
|
-
var serializer = env.
|
14272
|
+
var serializer = env.store.serializerFor('home-planet');
|
14155
14273
|
var json_hash = {
|
14156
14274
|
homePlanets: [{
|
14157
14275
|
id: '1',
|
@@ -14294,7 +14412,7 @@ define(
|
|
14294
14412
|
}));
|
14295
14413
|
//env.registry.register('serializer:secret-lab', TestSerializer);
|
14296
14414
|
|
14297
|
-
var serializer = env.
|
14415
|
+
var serializer = env.store.serializerFor('super-villain');
|
14298
14416
|
|
14299
14417
|
var json_hash = {
|
14300
14418
|
superVillain: {
|
@@ -14365,7 +14483,7 @@ define(
|
|
14365
14483
|
}
|
14366
14484
|
}));
|
14367
14485
|
|
14368
|
-
var serializer = env.
|
14486
|
+
var serializer = env.store.serializerFor('evil-minion');
|
14369
14487
|
var json_hash = {
|
14370
14488
|
evilMinion: {
|
14371
14489
|
id: '1',
|
@@ -14443,7 +14561,7 @@ define(
|
|
14443
14561
|
secretWeapons: { embedded: 'always' }
|
14444
14562
|
}
|
14445
14563
|
}));
|
14446
|
-
var serializer = env.
|
14564
|
+
var serializer = env.store.serializerFor('super-villain');
|
14447
14565
|
|
14448
14566
|
var json_hash = {
|
14449
14567
|
superVillain: {
|
@@ -14512,7 +14630,7 @@ define(
|
|
14512
14630
|
secretLab: { embedded: 'always' }
|
14513
14631
|
}
|
14514
14632
|
}));
|
14515
|
-
var serializer = env.
|
14633
|
+
var serializer = env.store.serializerFor('super-villain');
|
14516
14634
|
|
14517
14635
|
var json_hash = {
|
14518
14636
|
superVillain: {
|
@@ -14569,7 +14687,7 @@ define(
|
|
14569
14687
|
primaryKey: 'custom'
|
14570
14688
|
}));
|
14571
14689
|
|
14572
|
-
var serializer = env.
|
14690
|
+
var serializer = env.store.serializerFor('evil-minion');
|
14573
14691
|
var json_hash = {
|
14574
14692
|
evil_minion: {
|
14575
14693
|
id: '1',
|
@@ -14707,7 +14825,7 @@ define(
|
|
14707
14825
|
}
|
14708
14826
|
}));
|
14709
14827
|
|
14710
|
-
var serializer = env.
|
14828
|
+
var serializer = env.store.serializerFor('home-planet');
|
14711
14829
|
var json_hash = {
|
14712
14830
|
home_planet: {
|
14713
14831
|
id: '1',
|
@@ -14750,7 +14868,7 @@ define(
|
|
14750
14868
|
}
|
14751
14869
|
}));
|
14752
14870
|
|
14753
|
-
var serializer = env.
|
14871
|
+
var serializer = env.store.serializerFor('home-planet');
|
14754
14872
|
var json_hash = {
|
14755
14873
|
home_planet: {
|
14756
14874
|
id: '1',
|
@@ -14797,7 +14915,8 @@ define(
|
|
14797
14915
|
}
|
14798
14916
|
}));
|
14799
14917
|
|
14800
|
-
var serializer = env.
|
14918
|
+
var serializer = env.store.serializerFor('comment');
|
14919
|
+
|
14801
14920
|
var json_hash = {
|
14802
14921
|
comment: {
|
14803
14922
|
id: '1',
|
@@ -14837,7 +14956,7 @@ define(
|
|
14837
14956
|
}
|
14838
14957
|
}));
|
14839
14958
|
|
14840
|
-
var serializer = env.
|
14959
|
+
var serializer = env.store.serializerFor('comment');
|
14841
14960
|
var json_hash = {
|
14842
14961
|
comment: {
|
14843
14962
|
id: '1',
|
@@ -14890,7 +15009,7 @@ define(
|
|
14890
15009
|
}
|
14891
15010
|
}));
|
14892
15011
|
|
14893
|
-
var serializer = env.
|
15012
|
+
var serializer = env.store.serializerFor('home-planet');
|
14894
15013
|
var json_hash = {
|
14895
15014
|
home_planet: {
|
14896
15015
|
id: '1',
|
@@ -14937,7 +15056,7 @@ define(
|
|
14937
15056
|
}
|
14938
15057
|
}));
|
14939
15058
|
|
14940
|
-
var serializer = env.
|
15059
|
+
var serializer = env.store.serializerFor('home-planet');
|
14941
15060
|
|
14942
15061
|
var json_hash = {
|
14943
15062
|
home_planets: [{
|
@@ -14981,7 +15100,7 @@ define(
|
|
14981
15100
|
}
|
14982
15101
|
}));
|
14983
15102
|
|
14984
|
-
var serializer = env.
|
15103
|
+
var serializer = env.store.serializerFor('home-planet');
|
14985
15104
|
|
14986
15105
|
var json_hash = {
|
14987
15106
|
home_planets: [{
|
@@ -15026,7 +15145,7 @@ define(
|
|
15026
15145
|
}
|
15027
15146
|
}));
|
15028
15147
|
|
15029
|
-
var serializer = env.
|
15148
|
+
var serializer = env.store.serializerFor('home-planet');
|
15030
15149
|
|
15031
15150
|
var json_hash = {
|
15032
15151
|
home_planets: [{
|
@@ -15065,7 +15184,7 @@ define(
|
|
15065
15184
|
}
|
15066
15185
|
}));
|
15067
15186
|
|
15068
|
-
var serializer = env.
|
15187
|
+
var serializer = env.store.serializerFor('comment');
|
15069
15188
|
|
15070
15189
|
var json_hash = {
|
15071
15190
|
comments: [{
|
@@ -15113,7 +15232,7 @@ define(
|
|
15113
15232
|
}
|
15114
15233
|
}));
|
15115
15234
|
|
15116
|
-
var serializer = env.
|
15235
|
+
var serializer = env.store.serializerFor('home-planet');
|
15117
15236
|
var json_hash = {
|
15118
15237
|
home_planets: [{
|
15119
15238
|
id: '1',
|
@@ -15189,7 +15308,7 @@ define(
|
|
15189
15308
|
}));
|
15190
15309
|
var serializer, json;
|
15191
15310
|
run(function () {
|
15192
|
-
serializer = env.
|
15311
|
+
serializer = env.store.serializerFor('super-villain');
|
15193
15312
|
json = serializer.serialize(tom._createSnapshot());
|
15194
15313
|
});
|
15195
15314
|
|
@@ -15215,7 +15334,7 @@ define(
|
|
15215
15334
|
|
15216
15335
|
var serializer, json;
|
15217
15336
|
run(function () {
|
15218
|
-
serializer = env.
|
15337
|
+
serializer = env.store.serializerFor('home-planet');
|
15219
15338
|
|
15220
15339
|
json = serializer.serialize(league._createSnapshot());
|
15221
15340
|
});
|
@@ -15247,7 +15366,7 @@ define(
|
|
15247
15366
|
var serializer, json;
|
15248
15367
|
warns(function () {
|
15249
15368
|
run(function () {
|
15250
|
-
serializer = env.
|
15369
|
+
serializer = env.store.serializerFor('home-planet');
|
15251
15370
|
json = serializer.serialize(league._createSnapshot());
|
15252
15371
|
});
|
15253
15372
|
}, /The embedded relationship 'villains' is undefined for 'home-planet' with id '123'. Please include it in your original payload./);
|
@@ -15271,7 +15390,7 @@ define(
|
|
15271
15390
|
}));
|
15272
15391
|
var serializer, json;
|
15273
15392
|
run(function () {
|
15274
|
-
serializer = env.
|
15393
|
+
serializer = env.store.serializerFor('home-planet');
|
15275
15394
|
|
15276
15395
|
json = serializer.serialize(league._createSnapshot());
|
15277
15396
|
});
|
@@ -15294,7 +15413,7 @@ define(
|
|
15294
15413
|
}));
|
15295
15414
|
var serializer, json;
|
15296
15415
|
run(function () {
|
15297
|
-
serializer = env.
|
15416
|
+
serializer = env.store.serializerFor('home-planet');
|
15298
15417
|
|
15299
15418
|
json = serializer.serialize(league._createSnapshot());
|
15300
15419
|
});
|
@@ -15353,7 +15472,7 @@ define(
|
|
15353
15472
|
}
|
15354
15473
|
}));
|
15355
15474
|
|
15356
|
-
var serializer = env.
|
15475
|
+
var serializer = env.store.serializerFor('super-villain');
|
15357
15476
|
|
15358
15477
|
var json_hash = {
|
15359
15478
|
super_villain: {
|
@@ -15404,7 +15523,7 @@ define(
|
|
15404
15523
|
}));
|
15405
15524
|
var serializer, json, tom;
|
15406
15525
|
run(function () {
|
15407
|
-
serializer = env.
|
15526
|
+
serializer = env.store.serializerFor('super-villain');
|
15408
15527
|
|
15409
15528
|
// records with an id, persisted
|
15410
15529
|
|
@@ -15442,7 +15561,7 @@ define(
|
|
15442
15561
|
primaryKey: 'crazy_id'
|
15443
15562
|
}));
|
15444
15563
|
|
15445
|
-
var serializer = env.
|
15564
|
+
var serializer = env.store.serializerFor('super-villain');
|
15446
15565
|
|
15447
15566
|
// records with an id, persisted
|
15448
15567
|
var tom, json;
|
@@ -15478,7 +15597,7 @@ define(
|
|
15478
15597
|
}
|
15479
15598
|
}));
|
15480
15599
|
|
15481
|
-
var serializer = env.
|
15600
|
+
var serializer = env.store.serializerFor('super-villain');
|
15482
15601
|
|
15483
15602
|
// records without ids, new
|
15484
15603
|
var tom, json;
|
@@ -15512,7 +15631,7 @@ define(
|
|
15512
15631
|
secretLab: { serialize: 'ids' }
|
15513
15632
|
}
|
15514
15633
|
}));
|
15515
|
-
var serializer = env.
|
15634
|
+
var serializer = env.store.serializerFor('super-villain');
|
15516
15635
|
|
15517
15636
|
// records with an id, persisted
|
15518
15637
|
var tom, json;
|
@@ -15544,7 +15663,7 @@ define(
|
|
15544
15663
|
}
|
15545
15664
|
}));
|
15546
15665
|
|
15547
|
-
var serializer = env.
|
15666
|
+
var serializer = env.store.serializerFor('super-villain');
|
15548
15667
|
|
15549
15668
|
// records with an id, persisted
|
15550
15669
|
var tom, json;
|
@@ -15576,7 +15695,7 @@ define(
|
|
15576
15695
|
}
|
15577
15696
|
}));
|
15578
15697
|
|
15579
|
-
var serializer = env.
|
15698
|
+
var serializer = env.store.serializerFor('super-villain');
|
15580
15699
|
|
15581
15700
|
// records with an id, persisted
|
15582
15701
|
var tom, json;
|
@@ -15607,7 +15726,7 @@ define(
|
|
15607
15726
|
secretLab: { serialize: false }
|
15608
15727
|
}
|
15609
15728
|
}));
|
15610
|
-
var serializer = env.
|
15729
|
+
var serializer = env.store.serializerFor('super-villain');
|
15611
15730
|
|
15612
15731
|
// records with an id, persisted
|
15613
15732
|
var tom, json;
|
@@ -15632,7 +15751,7 @@ define(
|
|
15632
15751
|
test('serialize with embedded object (belongsTo relationship) serializes the id by default if no option specified', function () {
|
15633
15752
|
env.registry.register('adapter:super-villain', DS.ActiveModelAdapter);
|
15634
15753
|
env.registry.register('serializer:super-villain', DS.ActiveModelSerializer.extend(DS.EmbeddedRecordsMixin));
|
15635
|
-
var serializer = env.
|
15754
|
+
var serializer = env.store.serializerFor('super-villain');
|
15636
15755
|
|
15637
15756
|
// records with an id, persisted
|
15638
15757
|
|
@@ -15664,7 +15783,7 @@ define(
|
|
15664
15783
|
secretLab: { embedded: 'always' }
|
15665
15784
|
}
|
15666
15785
|
}));
|
15667
|
-
var serializer = env.
|
15786
|
+
var serializer = env.store.serializerFor('super-villain');
|
15668
15787
|
var tom, json;
|
15669
15788
|
|
15670
15789
|
run(function () {
|
@@ -15698,7 +15817,7 @@ define(
|
|
15698
15817
|
}
|
15699
15818
|
}));
|
15700
15819
|
|
15701
|
-
var serializer = env.
|
15820
|
+
var serializer = env.store.serializerFor('evil-minion');
|
15702
15821
|
var json_hash = {
|
15703
15822
|
evil_minion: {
|
15704
15823
|
id: '1',
|
@@ -15743,7 +15862,7 @@ define(
|
|
15743
15862
|
secretWeapons: { embedded: 'always' }
|
15744
15863
|
}
|
15745
15864
|
}));
|
15746
|
-
var serializer = env.
|
15865
|
+
var serializer = env.store.serializerFor('super-villain');
|
15747
15866
|
|
15748
15867
|
var json_hash = {
|
15749
15868
|
super_villain: {
|
@@ -15793,7 +15912,7 @@ define(
|
|
15793
15912
|
secretWeapons: { embedded: 'always' }
|
15794
15913
|
}
|
15795
15914
|
}));
|
15796
|
-
var serializer = env.
|
15915
|
+
var serializer = env.store.serializerFor('super-villain');
|
15797
15916
|
|
15798
15917
|
var json_hash = {
|
15799
15918
|
super_villain: {
|
@@ -15842,7 +15961,7 @@ define(
|
|
15842
15961
|
secretLab: { embedded: 'always' }
|
15843
15962
|
}
|
15844
15963
|
}));
|
15845
|
-
var serializer = env.
|
15964
|
+
var serializer = env.store.serializerFor('super-villain');
|
15846
15965
|
|
15847
15966
|
var json_hash = {
|
15848
15967
|
super_villain: {
|
@@ -15890,7 +16009,7 @@ define(
|
|
15890
16009
|
env.registry.register('serializer:bat-cave', DS.ActiveModelSerializer.extend({
|
15891
16010
|
primaryKey: 'custom'
|
15892
16011
|
}));
|
15893
|
-
var serializer = env.
|
16012
|
+
var serializer = env.store.serializerFor('super-villain');
|
15894
16013
|
|
15895
16014
|
var json_hash = {
|
15896
16015
|
super_villain: {
|
@@ -15938,7 +16057,7 @@ define(
|
|
15938
16057
|
env.registry.register('serializer:bat-cave', DS.ActiveModelSerializer.extend({
|
15939
16058
|
primaryKey: 'custom'
|
15940
16059
|
}));
|
15941
|
-
var serializer = env.
|
16060
|
+
var serializer = env.store.serializerFor('super-villain');
|
15942
16061
|
|
15943
16062
|
var json_hash = {
|
15944
16063
|
super_villain: {
|
@@ -15990,7 +16109,7 @@ define(
|
|
15990
16109
|
evilMinions: { serialize: 'records', deserialize: 'records' }
|
15991
16110
|
}
|
15992
16111
|
}));
|
15993
|
-
var serializer = env.
|
16112
|
+
var serializer = env.store.serializerFor('super-villain');
|
15994
16113
|
var json;
|
15995
16114
|
|
15996
16115
|
run(function () {
|
@@ -16023,7 +16142,7 @@ define(
|
|
16023
16142
|
primaryKey: 'custom'
|
16024
16143
|
}));
|
16025
16144
|
|
16026
|
-
var serializer = env.
|
16145
|
+
var serializer = env.store.serializerFor('evil-minion');
|
16027
16146
|
var json_hash = {
|
16028
16147
|
evil_minion: {
|
16029
16148
|
id: '1',
|
@@ -16092,7 +16211,7 @@ define(
|
|
16092
16211
|
// e.g. secretWeapons: { serialize: 'ids' }
|
16093
16212
|
}
|
16094
16213
|
}));
|
16095
|
-
var serializer = env.
|
16214
|
+
var serializer = env.store.serializerFor('super-villain');
|
16096
16215
|
|
16097
16216
|
var json;
|
16098
16217
|
run(function () {
|
@@ -16136,7 +16255,7 @@ define(
|
|
16136
16255
|
}
|
16137
16256
|
}));
|
16138
16257
|
|
16139
|
-
var serializer = env.
|
16258
|
+
var serializer = env.store.serializerFor('evil-minion');
|
16140
16259
|
var json;
|
16141
16260
|
|
16142
16261
|
run(function () {
|
@@ -16208,7 +16327,7 @@ define(
|
|
16208
16327
|
});
|
16209
16328
|
|
16210
16329
|
store = env.store;
|
16211
|
-
serializer =
|
16330
|
+
serializer = store.serializerFor('-json-api');
|
16212
16331
|
},
|
16213
16332
|
|
16214
16333
|
teardown: function () {
|
@@ -16533,7 +16652,7 @@ define(
|
|
16533
16652
|
});
|
16534
16653
|
var json = {};
|
16535
16654
|
|
16536
|
-
env.
|
16655
|
+
env.store.serializerFor('post').serializeAttribute(post._createSnapshot(), json, 'title', { type: 'string' });
|
16537
16656
|
|
16538
16657
|
deepEqual(json, { TITLE: 'Rails is omakase' });
|
16539
16658
|
});
|
@@ -16592,7 +16711,7 @@ define(
|
|
16592
16711
|
});
|
16593
16712
|
var json = {};
|
16594
16713
|
|
16595
|
-
env.
|
16714
|
+
env.store.serializerFor('post').serializeBelongsTo(comment._createSnapshot(), json, { key: 'post', options: {} });
|
16596
16715
|
|
16597
16716
|
deepEqual(json, {
|
16598
16717
|
POST: '1'
|
@@ -16613,7 +16732,7 @@ define(
|
|
16613
16732
|
|
16614
16733
|
var json = {};
|
16615
16734
|
|
16616
|
-
env.
|
16735
|
+
env.store.serializerFor('post').serializeHasMany(post._createSnapshot(), json, { key: 'comments', options: {} });
|
16617
16736
|
|
16618
16737
|
deepEqual(json, {
|
16619
16738
|
COMMENTS: ['1']
|
@@ -16653,7 +16772,7 @@ define(
|
|
16653
16772
|
comment = env.store.createRecord('comment', { body: 'Omakase is delicious', post: post });
|
16654
16773
|
});
|
16655
16774
|
|
16656
|
-
env.
|
16775
|
+
env.store.serializerFor('comment').serializeBelongsTo(comment._createSnapshot(), {}, { key: 'post', options: { polymorphic: true } });
|
16657
16776
|
});
|
16658
16777
|
|
16659
16778
|
test('serializePolymorphicType async', function () {
|
@@ -16674,7 +16793,7 @@ define(
|
|
16674
16793
|
comment = env.store.createRecord('comment', { body: 'Omakase is delicious', post: post });
|
16675
16794
|
});
|
16676
16795
|
|
16677
|
-
env.
|
16796
|
+
env.store.serializerFor('comment').serializeBelongsTo(comment._createSnapshot(), {}, { key: 'post', options: { async: true, polymorphic: true } });
|
16678
16797
|
});
|
16679
16798
|
|
16680
16799
|
test('extractArray normalizes each record in the array', function () {
|
@@ -16689,7 +16808,7 @@ define(
|
|
16689
16808
|
}));
|
16690
16809
|
|
16691
16810
|
run(function () {
|
16692
|
-
env.
|
16811
|
+
env.store.serializerFor('post').extractArray(env.store, Post, posts);
|
16693
16812
|
});
|
16694
16813
|
equal(postNormalizeCount, 2, 'two posts are normalized');
|
16695
16814
|
});
|
@@ -16707,7 +16826,7 @@ define(
|
|
16707
16826
|
my_comments: [1, 2]
|
16708
16827
|
};
|
16709
16828
|
|
16710
|
-
var post = env.
|
16829
|
+
var post = env.store.serializerFor('post').extractSingle(env.store, Post, jsonHash);
|
16711
16830
|
|
16712
16831
|
equal(post.title, 'Rails is omakase');
|
16713
16832
|
deepEqual(post.comments, [1, 2]);
|
@@ -16730,7 +16849,7 @@ define(
|
|
16730
16849
|
post = env.store.createRecord('post', { title: 'Rails is omakase', parentPost: parentPost });
|
16731
16850
|
});
|
16732
16851
|
|
16733
|
-
var payload = env.
|
16852
|
+
var payload = env.store.serializerFor('post').serialize(post._createSnapshot());
|
16734
16853
|
|
16735
16854
|
equal(payload.title_payload_key, 'Rails is omakase');
|
16736
16855
|
equal(payload.my_parent, '2');
|
@@ -16748,7 +16867,7 @@ define(
|
|
16748
16867
|
post = env.store.createRecord('post', { title: 'Rails is omakase' });
|
16749
16868
|
});
|
16750
16869
|
|
16751
|
-
var payload = env.
|
16870
|
+
var payload = env.store.serializerFor('post').serialize(post._createSnapshot());
|
16752
16871
|
|
16753
16872
|
ok(!payload.hasOwnProperty('title'), 'Does not add the key to instance');
|
16754
16873
|
ok(!payload.hasOwnProperty('[object Object]'), 'Does not add some random key like [object Object]');
|
@@ -16767,7 +16886,7 @@ define(
|
|
16767
16886
|
comment = env.store.createRecord('comment', { body: 'Omakase is delicious', post: post });
|
16768
16887
|
});
|
16769
16888
|
|
16770
|
-
var serializer = env.
|
16889
|
+
var serializer = env.store.serializerFor('post');
|
16771
16890
|
var serializedProperty = serializer.keyForRelationship('comments', 'hasMany');
|
16772
16891
|
|
16773
16892
|
var payload = serializer.serialize(post._createSnapshot());
|
@@ -16787,7 +16906,7 @@ define(
|
|
16787
16906
|
comment = env.store.createRecord('comment', { body: 'Omakase is delicious', post: post });
|
16788
16907
|
});
|
16789
16908
|
|
16790
|
-
var serializer = env.
|
16909
|
+
var serializer = env.store.serializerFor('comment');
|
16791
16910
|
var serializedProperty = serializer.keyForRelationship('post', 'belongsTo');
|
16792
16911
|
|
16793
16912
|
var payload = serializer.serialize(comment._createSnapshot());
|
@@ -16807,7 +16926,7 @@ define(
|
|
16807
16926
|
comment = env.store.createRecord('comment', { body: 'Omakase is delicious', post: post });
|
16808
16927
|
});
|
16809
16928
|
|
16810
|
-
var serializer = env.
|
16929
|
+
var serializer = env.store.serializerFor('post');
|
16811
16930
|
var serializedProperty = serializer.keyForRelationship('comments', 'hasMany');
|
16812
16931
|
|
16813
16932
|
var payload = serializer.serialize(post._createSnapshot());
|
@@ -16827,7 +16946,7 @@ define(
|
|
16827
16946
|
comment = env.store.createRecord('comment', { body: 'Omakase is delicious', post: post });
|
16828
16947
|
});
|
16829
16948
|
|
16830
|
-
var serializer = env.
|
16949
|
+
var serializer = env.store.serializerFor('comment');
|
16831
16950
|
var serializedProperty = serializer.keyForRelationship('post', 'belongsTo');
|
16832
16951
|
|
16833
16952
|
var payload = serializer.serialize(comment._createSnapshot());
|
@@ -16847,7 +16966,7 @@ define(
|
|
16847
16966
|
comment = env.store.createRecord('comment', { body: 'Omakase is delicious', post: post });
|
16848
16967
|
});
|
16849
16968
|
|
16850
|
-
var serializer = env.
|
16969
|
+
var serializer = env.store.serializerFor('post');
|
16851
16970
|
var serializedProperty = serializer.keyForRelationship('comments', 'hasMany');
|
16852
16971
|
|
16853
16972
|
var payload = serializer.serialize(post._createSnapshot());
|
@@ -16867,7 +16986,7 @@ define(
|
|
16867
16986
|
comment = env.store.createRecord('comment', { body: 'Omakase is delicious', post: post });
|
16868
16987
|
});
|
16869
16988
|
|
16870
|
-
var serializer = env.
|
16989
|
+
var serializer = env.store.serializerFor('comment');
|
16871
16990
|
var serializedProperty = serializer.keyForRelationship('post', 'belongsTo');
|
16872
16991
|
|
16873
16992
|
var payload = serializer.serialize(comment._createSnapshot());
|
@@ -16897,7 +17016,7 @@ define(
|
|
16897
17016
|
post = env.store.createRecord('post', { title: 'Rails is omakase', description: 'Omakase is delicious', anotherString: 'yet another string' });
|
16898
17017
|
});
|
16899
17018
|
|
16900
|
-
var payload = env.
|
17019
|
+
var payload = env.store.serializerFor('post').serialize(post._createSnapshot());
|
16901
17020
|
|
16902
17021
|
equal(payload.title_payload_key, 'Rails is omakase');
|
16903
17022
|
equal(payload.description_payload_key, 'Omakase is delicious');
|
@@ -16913,7 +17032,7 @@ define(
|
|
16913
17032
|
var jsonHash = { '_ID_': 1, title: 'Rails is omakase' };
|
16914
17033
|
|
16915
17034
|
run(function () {
|
16916
|
-
post = env.
|
17035
|
+
post = env.store.serializerFor('post').extractSingle(env.store, Post, jsonHash);
|
16917
17036
|
});
|
16918
17037
|
|
16919
17038
|
equal(post.id, '1');
|
@@ -16929,7 +17048,7 @@ define(
|
|
16929
17048
|
post = env.store.createRecord('post', { id: '1', title: 'Rails is omakase' });
|
16930
17049
|
});
|
16931
17050
|
|
16932
|
-
var payload = env.
|
17051
|
+
var payload = env.store.serializerFor('post').serialize(post._createSnapshot(), { includeId: true });
|
16933
17052
|
|
16934
17053
|
equal(payload._ID_, '1');
|
16935
17054
|
});
|
@@ -16943,7 +17062,7 @@ define(
|
|
16943
17062
|
|
16944
17063
|
var jsonHash = { id: 1, TITLE: 'Rails is omakase' };
|
16945
17064
|
|
16946
|
-
post = env.
|
17065
|
+
post = env.store.serializerFor('post').normalize(Post, jsonHash);
|
16947
17066
|
|
16948
17067
|
equal(post.id, '1');
|
16949
17068
|
equal(post.title, 'Rails is omakase');
|
@@ -16958,7 +17077,7 @@ define(
|
|
16958
17077
|
|
16959
17078
|
var jsonHash = { id: 1, title: 'Rails is omakase', COMMENTS: ['1'] };
|
16960
17079
|
|
16961
|
-
post = env.
|
17080
|
+
post = env.store.serializerFor('post').normalize(Post, jsonHash);
|
16962
17081
|
|
16963
17082
|
deepEqual(post.comments, ['1']);
|
16964
17083
|
});
|
@@ -17006,7 +17125,7 @@ define(
|
|
17006
17125
|
inHash: DS.attr('string')
|
17007
17126
|
});
|
17008
17127
|
|
17009
|
-
var normalizedPayload = env.
|
17128
|
+
var normalizedPayload = env.store.serializerFor('post').normalize(Post, {
|
17010
17129
|
id: '1',
|
17011
17130
|
title: 'Ember rocks',
|
17012
17131
|
author: 1,
|
@@ -17037,7 +17156,7 @@ define(
|
|
17037
17156
|
favorite = env.store.createRecord('favorite', { post: post, id: '3' });
|
17038
17157
|
});
|
17039
17158
|
|
17040
|
-
env.
|
17159
|
+
env.store.serializerFor('favorite').serializeBelongsTo(favorite._createSnapshot(), json, { key: 'post', options: { polymorphic: true, async: true } });
|
17041
17160
|
|
17042
17161
|
deepEqual(json, expected, 'returned JSON is correct');
|
17043
17162
|
});
|
@@ -17053,14 +17172,14 @@ define(
|
|
17053
17172
|
var payload = {
|
17054
17173
|
errors: [{
|
17055
17174
|
source: { pointer: 'data/attributes/le_title' },
|
17056
|
-
|
17175
|
+
detail: 'title errors'
|
17057
17176
|
}, {
|
17058
17177
|
source: { pointer: 'data/attributes/my_comments' },
|
17059
|
-
|
17178
|
+
detail: 'comments errors'
|
17060
17179
|
}]
|
17061
17180
|
};
|
17062
17181
|
|
17063
|
-
var errors = env.
|
17182
|
+
var errors = env.store.serializerFor('post').extractErrors(env.store, Post, payload);
|
17064
17183
|
|
17065
17184
|
deepEqual(errors, {
|
17066
17185
|
title: ['title errors'],
|
@@ -17075,11 +17194,11 @@ define(
|
|
17075
17194
|
attributeWhichWillBeRemovedinExtractErrors: ['true'],
|
17076
17195
|
errors: [{
|
17077
17196
|
source: { pointer: 'data/attributes/title' },
|
17078
|
-
|
17197
|
+
detail: 'title errors'
|
17079
17198
|
}]
|
17080
17199
|
};
|
17081
17200
|
|
17082
|
-
var errors = env.
|
17201
|
+
var errors = env.store.serializerFor('post').extractErrors(env.store, Post, payload);
|
17083
17202
|
|
17084
17203
|
deepEqual(errors, { title: ['title errors'] });
|
17085
17204
|
});
|
@@ -17091,7 +17210,7 @@ define(
|
|
17091
17210
|
untouchedSinceNoErrorsSiblingPresent: ['true']
|
17092
17211
|
};
|
17093
17212
|
|
17094
|
-
var errors = env.
|
17213
|
+
var errors = env.store.serializerFor('post').extractErrors(env.store, Post, payload);
|
17095
17214
|
|
17096
17215
|
deepEqual(errors, { untouchedSinceNoErrorsSiblingPresent: ['true'] });
|
17097
17216
|
});
|
@@ -19376,15 +19495,15 @@ define(
|
|
19376
19495
|
|
19377
19496
|
var errorsArray = [{
|
19378
19497
|
title: "Invalid Attribute",
|
19379
|
-
|
19498
|
+
detail: "is invalid",
|
19380
19499
|
source: { pointer: "data/attributes/name" }
|
19381
19500
|
}, {
|
19382
19501
|
title: "Invalid Attribute",
|
19383
|
-
|
19502
|
+
detail: "must be a string",
|
19384
19503
|
source: { pointer: "data/attributes/name" }
|
19385
19504
|
}, {
|
19386
19505
|
title: "Invalid Attribute",
|
19387
|
-
|
19506
|
+
detail: "must be a number",
|
19388
19507
|
source: { pointer: "data/attributes/age" }
|
19389
19508
|
}];
|
19390
19509
|
|
@@ -19407,7 +19526,7 @@ define(
|
|
19407
19526
|
|
19408
19527
|
deepEqual(error.errors, [{
|
19409
19528
|
title: "Invalid Attribute",
|
19410
|
-
|
19529
|
+
detail: "is invalid",
|
19411
19530
|
source: { pointer: "data/attributes/name" }
|
19412
19531
|
}]);
|
19413
19532
|
});
|
@@ -20150,6 +20269,8 @@ define("ember-data/tests/unit/model-test", ["exports"], function(__exports__) {
|
|
20150
20269
|
__exports__[name] = value;
|
20151
20270
|
}
|
20152
20271
|
|
20272
|
+
var keysFunc = Object.keys || Ember.keys;
|
20273
|
+
|
20153
20274
|
var get = Ember.get;
|
20154
20275
|
var set = Ember.set;
|
20155
20276
|
var run = Ember.run;
|
@@ -20360,7 +20481,7 @@ define("ember-data/tests/unit/model-test", ["exports"], function(__exports__) {
|
|
20360
20481
|
mascot = store.push('mascot', { id: 1, likes: 'JavaScript', isMascot: true });
|
20361
20482
|
});
|
20362
20483
|
|
20363
|
-
equal(
|
20484
|
+
equal(keysFunc(mascot.changedAttributes()).length, 0, 'there are no initial changes');
|
20364
20485
|
run(function () {
|
20365
20486
|
mascot.set('name', 'Tomster'); // new value
|
20366
20487
|
mascot.set('likes', 'Ember.js'); // changed value
|
@@ -20373,7 +20494,7 @@ define("ember-data/tests/unit/model-test", ["exports"], function(__exports__) {
|
|
20373
20494
|
run(function () {
|
20374
20495
|
mascot.rollbackAttributes();
|
20375
20496
|
});
|
20376
|
-
equal(
|
20497
|
+
equal(keysFunc(mascot.changedAttributes()).length, 0, 'after rollback attributes there are no changes');
|
20377
20498
|
});
|
20378
20499
|
|
20379
20500
|
test('a DS.Model does not require an attribute type', function () {
|
@@ -22826,6 +22947,8 @@ define(
|
|
22826
22947
|
__exports__[name] = value;
|
22827
22948
|
}
|
22828
22949
|
|
22950
|
+
var keysFunc = Object.keys || Ember.keys;
|
22951
|
+
|
22829
22952
|
var env, store, Person, Dog;
|
22830
22953
|
var run = Ember.run;
|
22831
22954
|
|
@@ -22932,7 +23055,7 @@ define(
|
|
22932
23055
|
|
22933
23056
|
equal(person.get("firstName"), "Tom");
|
22934
23057
|
equal(person.get("isError"), false);
|
22935
|
-
equal(
|
23058
|
+
equal(keysFunc(person.changedAttributes()).length, 0);
|
22936
23059
|
});
|
22937
23060
|
});
|
22938
23061
|
});
|
@@ -25321,6 +25444,8 @@ define(
|
|
25321
25444
|
__exports__[name] = value;
|
25322
25445
|
}
|
25323
25446
|
|
25447
|
+
var keysFunc = Object.keys || Ember.keys;
|
25448
|
+
|
25324
25449
|
var store;
|
25325
25450
|
|
25326
25451
|
var run = Ember.run;
|
@@ -25352,7 +25477,7 @@ define(
|
|
25352
25477
|
expect(7);
|
25353
25478
|
|
25354
25479
|
function metadataKeys(type) {
|
25355
|
-
return
|
25480
|
+
return keysFunc(store.metadataFor(type));
|
25356
25481
|
}
|
25357
25482
|
|
25358
25483
|
// Currently not using QUnit.deepEqual due to the way deepEqual
|
@@ -26965,6 +27090,13 @@ test('ember-data/lib/system/normalize-model-name.js should pass jshint', functio
|
|
26965
27090
|
ok(true, 'ember-data/lib/system/normalize-model-name.js should pass jshint.');
|
26966
27091
|
});
|
26967
27092
|
|
27093
|
+
}
|
27094
|
+
if (!QUnit.urlParams.nojshint) {
|
27095
|
+
module('JSHint - ember-data/lib/system');
|
27096
|
+
test('ember-data/lib/system/object-polyfills.js should pass jshint', function() {
|
27097
|
+
ok(true, 'ember-data/lib/system/object-polyfills.js should pass jshint.');
|
27098
|
+
});
|
27099
|
+
|
26968
27100
|
}
|
26969
27101
|
if (!QUnit.urlParams.nojshint) {
|
26970
27102
|
module('JSHint - ember-data/lib/system');
|