-
-
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.
- Loading branch information
Showing
5 changed files
with
126 additions
and
1 deletion.
There are no files selected for viewing
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,40 @@ | ||
var setupTestHooks = require('ember-cli-blueprint-test-helpers/lib/helpers/setup'); | ||
var BlueprintHelpers = require('ember-cli-blueprint-test-helpers/lib/helpers/blueprint-helper'); | ||
var generateAndDestroy = BlueprintHelpers.generateAndDestroy; | ||
|
||
describe('Acceptance: generate and destroy model blueprints', function() { | ||
setupTestHooks(this); | ||
|
||
it('model', function() { | ||
return generateAndDestroy(['model', 'foo'], { | ||
files: [ | ||
{ | ||
file: 'app/models/foo.js', | ||
contains: [ | ||
'import DS from \'ember-data\';', | ||
'export default DS.Model.extend(' | ||
] | ||
}, | ||
{ | ||
file: 'tests/unit/models/foo-test.js', | ||
contains: [ | ||
'moduleForModel(\'foo\'' | ||
] | ||
} | ||
] | ||
}); | ||
}); | ||
|
||
it('model-test', function() { | ||
return generateAndDestroy(['model-test', 'foo'], { | ||
files: [ | ||
{ | ||
file: 'tests/unit/models/foo-test.js', | ||
contains: [ | ||
'moduleForModel(\'foo\'' | ||
] | ||
} | ||
] | ||
}); | ||
}); | ||
}); |
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,40 @@ | ||
var setupTestHooks = require('ember-cli-blueprint-test-helpers/lib/helpers/setup'); | ||
var BlueprintHelpers = require('ember-cli-blueprint-test-helpers/lib/helpers/blueprint-helper'); | ||
var generateAndDestroy = BlueprintHelpers.generateAndDestroy; | ||
|
||
describe('Acceptance: generate and destroy serializer blueprints', function() { | ||
setupTestHooks(this); | ||
|
||
it('serializer', function() { | ||
return generateAndDestroy(['serializer', 'foo'], { | ||
files: [ | ||
{ | ||
file: 'app/serializers/foo.js', | ||
contains: [ | ||
'import DS from \'ember-data\';', | ||
'export default DS.RESTSerializer.extend(' | ||
] | ||
}, | ||
{ | ||
file: 'tests/unit/serializers/foo-test.js', | ||
contains: [ | ||
'moduleForModel(\'foo\'' | ||
] | ||
} | ||
] | ||
}); | ||
}); | ||
|
||
it('serializer-test', function() { | ||
return generateAndDestroy(['serializer-test', 'foo'], { | ||
files: [ | ||
{ | ||
file: 'tests/unit/serializers/foo-test.js', | ||
contains: [ | ||
'moduleForModel(\'foo\'' | ||
] | ||
} | ||
] | ||
}); | ||
}); | ||
}); |
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,42 @@ | ||
var setupTestHooks = require('ember-cli-blueprint-test-helpers/lib/helpers/setup'); | ||
var BlueprintHelpers = require('ember-cli-blueprint-test-helpers/lib/helpers/blueprint-helper'); | ||
var generateAndDestroy = BlueprintHelpers.generateAndDestroy; | ||
|
||
describe('Acceptance: generate and destroy transform blueprints', function() { | ||
setupTestHooks(this); | ||
|
||
it('transform', function() { | ||
return generateAndDestroy(['transform', 'foo'], { | ||
files: [ | ||
{ | ||
file: 'app/transforms/foo.js', | ||
contains: [ | ||
'import DS from \'ember-data\';', | ||
'export default DS.Transform.extend(', | ||
'deserialize: function(serialized) {', | ||
'serialize: function(deserialized) {' | ||
] | ||
}, | ||
{ | ||
file: 'tests/unit/transforms/foo-test.js', | ||
contains: [ | ||
'moduleFor(\'transform:foo\'' | ||
] | ||
} | ||
] | ||
}); | ||
}); | ||
|
||
it('transforms-test', function() { | ||
return generateAndDestroy(['transform-test', 'foo'], { | ||
files: [ | ||
{ | ||
file: 'tests/unit/transforms/foo-test.js', | ||
contains: [ | ||
'moduleFor(\'transform:foo\'' | ||
] | ||
} | ||
] | ||
}); | ||
}); | ||
}); |
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