-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #275 from Flexberry/fix-27-tests-update
Update tests structure
- Loading branch information
Showing
44 changed files
with
1,445 additions
and
1,627 deletions.
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
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 |
---|---|---|
@@ -1,35 +1,35 @@ | ||
import { run } from '@ember/runloop'; | ||
import { moduleFor, test } from 'ember-qunit'; | ||
import { module, test } from 'qunit'; | ||
import startApp from 'dummy/tests/helpers/start-app'; | ||
|
||
let App; | ||
|
||
moduleFor('service:store', 'Integration | Service | store', { | ||
beforeEach() { | ||
module('Integration | Service | store', function(hooks) { | ||
hooks.beforeEach(function() { | ||
App = startApp(); | ||
}, | ||
}); | ||
|
||
afterEach() { | ||
hooks.afterEach(function() { | ||
run(App, 'destroy'); | ||
}, | ||
}); | ||
}); | ||
|
||
test('create unload create', function(assert) { | ||
let done = assert.async(); | ||
run(() => { | ||
let store = App.__container__.lookup('service:store'); | ||
store.get('offlineGlobals').setOnlineAvailable(false); | ||
store.createRecord('ember-flexberry-dummy-application-user', { | ||
name: 'Man', | ||
eMail: '[email protected]', | ||
}).save().then((record) => { | ||
let id = record.get('id'); | ||
store.unloadRecord(record); | ||
assert.ok(store.createRecord('ember-flexberry-dummy-application-user', { | ||
id: id, | ||
name: 'SuperMan', | ||
eMail: '[email protected]', | ||
}), 'It is a place for SuperMan.'); | ||
}).finally(done); | ||
test('create unload create', function(assert) { | ||
let done = assert.async(); | ||
run(() => { | ||
let store = App.__container__.lookup('service:store'); | ||
store.get('offlineGlobals').setOnlineAvailable(false); | ||
store.createRecord('ember-flexberry-dummy-application-user', { | ||
name: 'Man', | ||
eMail: '[email protected]', | ||
}).save().then((record) => { | ||
let id = record.get('id'); | ||
store.unloadRecord(record); | ||
assert.ok(store.createRecord('ember-flexberry-dummy-application-user', { | ||
id: id, | ||
name: 'SuperMan', | ||
eMail: '[email protected]', | ||
}), 'It is a place for SuperMan.'); | ||
}).finally(done); | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.