all files / tests/dummy/app/models/ post.js

100% Statements 0/0
100% Branches 0/0
100% Functions 0/0
100% Lines 0/0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19                                     
import Model from 'ember-data/model';
import attr from 'ember-data/attr';
import { modelAction, resourceAction } from 'ember-custom-actions';
 
export default Model.extend({
  name: attr(),
  published: attr('boolean', { defaultValue: false }),
 
  publish: modelAction('publish', { responseType: 'object' }),
  list: resourceAction('list'),
  search: resourceAction('search', {
    method: 'GET',
    normalizeOperation: 'dasherize',
    queryParams: { showAll: true },
    headers: { testHeader: 'ok' }
  })
});