-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add remaining mocha rfc 232 blueprints (#5665)
* add mocha rfc232 serializer tests * add MU adapter test * add model mocha rfc 232 blueprints * add transform mocha rfc 232 blueprints
- Loading branch information
1 parent
9112790
commit 6252353
Showing
10 changed files
with
258 additions
and
0 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
blueprints/model-test/mocha-rfc-232-files/__root__/__path__/__test__.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { expect } from 'chai'; | ||
import { describe, it } from 'mocha'; | ||
import { setupTest } from 'ember-mocha'; | ||
|
||
describe('<%= friendlyTestDescription %>', function() { | ||
setupTest(); | ||
|
||
// Replace this with your real tests. | ||
it('exists', function() { | ||
let store = this.owner.lookup('service:store'); | ||
let model = store.createRecord('<%= dasherizedModuleName %>', {}); | ||
expect(model).to.be.ok; | ||
}); | ||
}); |
24 changes: 24 additions & 0 deletions
24
blueprints/serializer-test/mocha-rfc-232-files/__root__/__path__/__test__.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { expect } from 'chai'; | ||
import { describe, it } from 'mocha'; | ||
import { setupTest } from 'ember-mocha'; | ||
|
||
describe('<%= friendlyTestDescription %>', function() { | ||
setupTest(); | ||
|
||
// Replace this with your real tests. | ||
it('exists', function() { | ||
let store = this.owner.lookup('service:store'); | ||
let serializer = store.serializerFor('<%= dasherizedModuleName %>'); | ||
|
||
expect(serializer).to.be.ok; | ||
}); | ||
|
||
it('serializes records', function() { | ||
let store = this.owner.lookup('service:store'); | ||
let record = store.createRecord('<%= dasherizedModuleName %>', {}); | ||
|
||
let serializedRecord = record.serialize(); | ||
|
||
expect(serializedRecord).to.be.ok; | ||
}); | ||
}); |
13 changes: 13 additions & 0 deletions
13
blueprints/transform-test/mocha-rfc-232-files/__root__/__path__/__test__.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { expect } from 'chai'; | ||
import { describe, it } from 'mocha'; | ||
import { setupTest } from 'ember-mocha'; | ||
|
||
describe('<%= friendlyTestDescription %>', function() { | ||
setupTest(); | ||
|
||
// Replace this with your real tests. | ||
it('exists', function() { | ||
let transform = this.owner.lookup('transform:<%= dasherizedModuleName %>'); | ||
expect(transform).to.be.ok; | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { expect } from 'chai'; | ||
import { describe, it } from 'mocha'; | ||
import { setupTest } from 'ember-mocha'; | ||
|
||
describe('Unit | Model | foo', function() { | ||
setupTest(); | ||
|
||
// Replace this with your real tests. | ||
it('exists', function() { | ||
let store = this.owner.lookup('service:store'); | ||
let model = store.createRecord('foo', {}); | ||
expect(model).to.be.ok; | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { expect } from 'chai'; | ||
import { describe, it } from 'mocha'; | ||
import { setupTest } from 'ember-mocha'; | ||
|
||
describe('Unit | Serializer | foo', function() { | ||
setupTest(); | ||
|
||
// Replace this with your real tests. | ||
it('exists', function() { | ||
let store = this.owner.lookup('service:store'); | ||
let serializer = store.serializerFor('foo'); | ||
|
||
expect(serializer).to.be.ok; | ||
}); | ||
|
||
it('serializes records', function() { | ||
let store = this.owner.lookup('service:store'); | ||
let record = store.createRecord('foo', {}); | ||
|
||
let serializedRecord = record.serialize(); | ||
|
||
expect(serializedRecord).to.be.ok; | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { expect } from 'chai'; | ||
import { describe, it } from 'mocha'; | ||
import { setupTest } from 'ember-mocha'; | ||
|
||
describe('Unit | Transform | foo', function() { | ||
setupTest(); | ||
|
||
// Replace this with your real tests. | ||
it('exists', function() { | ||
let transform = this.owner.lookup('transform:foo'); | ||
expect(transform).to.be.ok; | ||
}); | ||
}); |