{"size": 703, "ext": "js", "max_stars_repo_path": "tests/unit/adapters/pet-test.js", "max_stars_repo_name": "alexander-alvarez/ember-data-test-helpers", "max_stars_repo_stars_event_min_datetime": "2017-12-19T16:54:52.000Z", "max_stars_repo_stars_event_max_datetime": "2017-12-19T16:54:52.000Z", "max_issues_repo_path": "tests/unit/adapters/pet-test.js", "max_issues_repo_name": "alexander-alvarez/ember-data-test-helpers", "max_issues_repo_issues_event_min_datetime": "2017-12-19T07:52:10.000Z", "max_issues_repo_issues_event_max_datetime": "2017-12-21T08:10:49.000Z", "max_forks_repo_path": "tests/unit/adapters/pet-test.js", "max_forks_repo_name": "alexander-alvarez/ember-data-test-helpers", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": 6, "max_forks_count": null, "avg_line_length": 37.0, "max_line_length": 75, "alphanum_fraction": 0.6571834993}
import { module, test } from 'qunit';
import { setupStoreTest } from 'ember-data-test-helpers';
import { run } from '@ember/runloop';

module('adapters:pet', 'Unit | Adapter | pet', function(hooks) {
  setupStoreTest(hooks);

  test('this.store, and this.createSnapshot', function(assert) {
    let store = this.store();
    let model = run(() => store.createRecord('pet', { name: 'spot' }));
    let options = { adapterOptions: { user_id: 25 } };
    let snapshot = this.createSnapshot(model, options);
    let adapter = this.owner.lookup('adapter:pet');

    let url = adapter.urlForFindRecord(1, 'pet', snapshot);
    assert.equal(url, `/user/${options.adapterOptions.user_id}/pets/${1}`);
  });
});
