Skip to content

Instantly share code, notes, and snippets.

@koriroys
Created February 3, 2015 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save koriroys/2979b4cb203ac70e5301 to your computer and use it in GitHub Desktop.
Save koriroys/2979b4cb203ac70e5301 to your computer and use it in GitHub Desktop.
testing ember
export default function(username, password) {
visit('/login');
fillIn('input.identification', username);
fillIn('input.password', password);
click('button.submit');
}
import login from 'appname/tests/extras/login';
test('Current user set properly when user logs in.', function() {
login('testuser', 'testpassword');
andThen(function() {
equal(find('.user-name').text().trim(), 'testuser', "current user not set properly");
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment