Created
May 1, 2013 23:27
-
-
Save walter/5499168 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| App = require 'app' | |
| # see Ember Model: https://github.com/ebryn/ember-model | |
| # for how this is set up | |
| require 'models/provider' | |
| require 'adapters/provider' | |
| describe 'Provider', -> | |
| describe '#create()', -> | |
| # essentially this is testing that our configuration is working | |
| # so somewhat of a redundant test | |
| it 'should return a new Provider record matching input', -> | |
| titleValue = "Example.com" | |
| domainValue = 'example.com' | |
| Ember.run -> | |
| provider = App.Provider.create | |
| title: titleValue | |
| domain: domainValue | |
| provider.save() | |
| providers = App.Provider.find() | |
| providers.then -> | |
| expect( providers.get('length') ).to.equal 1 | |
| provider = providers.firstObject() | |
| expect( provider.get('title') ).to.equal titleValue | |
| expect( provider.get('domain') ).to.equal domainValue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment