Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert internal tests to use json api format for store.push #3223

Closed
igorT opened this issue Jun 6, 2015 · 4 comments
Closed

Convert internal tests to use json api format for store.push #3223

igorT opened this issue Jun 6, 2015 · 4 comments

Comments

@igorT
Copy link
Member

igorT commented Jun 6, 2015

Everywhere where we do,
store.push(type, data) in tests, we need to convert to store.push(jsonApiFormat)
We can also break this up in multiple PRs and merge to a branch.

@igorT
Copy link
Member Author

igorT commented Jun 6, 2015

Instead of pushing something like

store.push('user', { 
  id:1, 
  name: 'bmac', 
  friends: [1,2,3], 
  links: { 
    other: 'hello' 
  }
})

should now do something like:

store.push({ 
  id:1, 
  type: 'user',
  attributes: {
    name: 'bmac'
  },
  relationships: { 
    friends: {
       data: [{ type: 'location', id:1}, { type: 'location', id:2}, { type: 'location', id:3}]
     },
     other: {
       links: { 
         related: 'hello' 
       }
    }
})

@igorT
Copy link
Member Author

igorT commented Jun 6, 2015

Will need to temporarily comment out Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of '+ Ember.inspect(modelName), typeof modelName === 'string');

@fivetanley
Copy link
Member

Why?

@Serabe
Copy link
Member

Serabe commented Jun 7, 2015

Sorry, I've been in a plane for most of my weekend. I see @stevenwu has started to tackle the issue. If it is too big for one person and you decide to split it in several, or if @stevenwu needs some help, just let me know.

andrejunges added a commit to andrejunges/data that referenced this issue Jun 8, 2015
…js#3223

This PR will break some tests, but now the the calls to store.push are
using jsonApiFormat
andrejunges added a commit to andrejunges/data that referenced this issue Jun 19, 2015
…js#3223

This PR will break some tests, but now the the calls to store.push are
using jsonApiFormat
andrejunges added a commit to andrejunges/data that referenced this issue Jun 20, 2015
…js#3223

This PR will break some tests, but now the the calls to store.push are
using jsonApiFormat
andrejunges added a commit to andrejunges/data that referenced this issue Jun 20, 2015
…js#3223

This PR will break some tests, but now the the calls to store.push are
using jsonApiFormat
andrejunges added a commit to andrejunges/data that referenced this issue Jun 20, 2015
[WIP] Convert unload test to json api format for `store.push`.. emberjs#3223

This PR will break some tests, but now the the calls to store.push are
using jsonApiFormat

filter-test store.push changes

migration store.push to jsonApiFormat on one-to-many-test

formatting changes

filte-test changes bestFriend attribute

one-to-many migration stopre.push

fix one-to-many bug

one-to-one tests store.push with jsonFormatApi
andrejunges added a commit to andrejunges/data that referenced this issue Jun 20, 2015
 store.push changes to JsonFormatApi
[WIP] Convert unload test to json api format for `store.push`.. emberjs#3223

This PR will break some tests, but now the the calls to store.push are
using jsonApiFormat

filter-test store.push changes

migration store.push to jsonApiFormat on one-to-many-test

formatting changes

filte-test changes bestFriend attribute

one-to-many migration stopre.push

fix one-to-many bug

one-to-one tests store.push with jsonFormatApi

consistency changes
andrejunges added a commit to andrejunges/data that referenced this issue Jun 24, 2015
 store.push changes to JsonFormatApi
[WIP] Convert unload test to json api format for `store.push`.. emberjs#3223

This PR will break some tests, but now the the calls to store.push are
using jsonApiFormat

filter-test store.push changes

migration store.push to jsonApiFormat on one-to-many-test

formatting changes

filte-test changes bestFriend attribute

one-to-many migration stopre.push

fix one-to-many bug

one-to-one tests store.push with jsonFormatApi

consistency changes
andrejunges added a commit to andrejunges/data that referenced this issue Jun 25, 2015
[CLEANUP beta] store.push JsonApiFormat changes

 store.push changes to JsonFormatApi
[WIP] Convert unload test to json api format for `store.push`.. emberjs#3223

This PR will break some tests, but now the the calls to store.push are
using jsonApiFormat

filter-test store.push changes

migration store.push to jsonApiFormat on one-to-many-test

formatting changes

filte-test changes bestFriend attribute

one-to-many migration stopre.push

fix one-to-many bug

one-to-one tests store.push with jsonFormatApi

consistency changes

belongs-to-test migration to JsonApiFormat

links changes to jsonApiFormat
wecc added a commit that referenced this issue Jun 25, 2015
Convert unload test to json api format for `store.push`.. #3223
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants