-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(test): added test for EmberAppItem
- Loading branch information
1 parent
e688eb5
commit 38d31f5
Showing
2 changed files
with
53 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/*global describe, it*/ | ||
import * as assert from 'assert'; | ||
import EmberAppItem from '../../../src/support/EmberAppItem'; | ||
|
||
describe('EmberAppItem', function() { | ||
let App = new EmberAppItem(); | ||
it('creates EmberApp Default config', function() { | ||
assert.equal(App.name,'emberapp'); | ||
assert.equal(App.mount,'/'); | ||
assert.equal(App.directory,'/emberapp'); | ||
assert.equal(App.access,'public'); | ||
assert.equal(App.adapter,'localhost'); | ||
assert.equal(App.subdomain,'www'); | ||
assert.equal(App.layout,'main'); | ||
}); | ||
|
||
it('creates EmberApp with config', function() { | ||
App = new EmberAppItem('test',{mount:'/panel'}); | ||
assert.equal(App.name,'test'); | ||
assert.equal(App.mount,'/panel'); | ||
assert.equal(App.directory,'/emberapp'); | ||
assert.equal(App.access,'public'); | ||
assert.equal(App.adapter,'localhost'); | ||
assert.equal(App.subdomain,'www'); | ||
assert.equal(App.layout,'main'); | ||
}); | ||
|
||
it('is equal if name are the same',function(){ | ||
let App2 = new EmberAppItem('test'); | ||
|
||
assert.equal(App.equals(App2),true); | ||
}); | ||
|
||
it('returns app\' name',function(){ | ||
assert.equal(App.valueOf(),'test'); | ||
}); | ||
}); |