Skip to content

Instantly share code, notes, and snippets.

@mockra
Created August 28, 2014 02:27

Revisions

  1. mockra created this gist Aug 28, 2014.
    20 changes: 20 additions & 0 deletions gravatar-image-test.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    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', '[email protected]');
    });

    this.append();

    equal(find('img').attr('src'),
    'http://www.gravatar.com/avatar/' +
    window.md5('[email protected]') +
    '?s=400');
    });