Skip to content

Instantly share code, notes, and snippets.

@pmkhoa
Forked from mockra/gravatar-image-test.js
Created October 24, 2015 22:46
Show Gist options
  • Save pmkhoa/143c5153bdf5abc0d6a5 to your computer and use it in GitHub Desktop.
Save pmkhoa/143c5153bdf5abc0d6a5 to your computer and use it in GitHub Desktop.
import { test, moduleForComponent } from 'ember-qunit';
moduleForComponent('gravatar-image', 'GravatarImageComponent', {
});
test('it renders with size and e-mail', function() {
var component = this.subject();
Ember.run(function(){
component.set('size', 400);
component.set('email', 'test@example.com');
});
this.append();
equal(find('img').attr('src'),
'http://www.gravatar.com/avatar/' +
window.md5('test@example.com') +
'?s=400');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment