Skip to content

Instantly share code, notes, and snippets.

@walter
Created August 20, 2014 23:43
Show Gist options
  • Select an option

  • Save walter/8ac0a307a635ca330037 to your computer and use it in GitHub Desktop.

Select an option

Save walter/8ac0a307a635ca330037 to your computer and use it in GitHub Desktop.
import Ember from 'ember'
import { test, moduleFor } from 'ember-qunit';
import startApp from '../../helpers/start-app';
var App;
moduleFor('helper:cdn-avatar-from', 'Helper: cdn-avatar-from', {
setup: function() {
App = startApp();
},
teardown: function() {
Ember.run(App, 'destroy');
}
});
test('it takes an imageUrl and returns cdn image tag', function() {
expect(1);
var helper = App.__container__.lookup('helper:cdn-avatar-from');
var result = helper._rawFunction("xyz");
var expected = '<img src="http://d2xfsikitl0nz3.cloudfront.net/xyz/60/60" width="60" height="60" alt="" />';
equal(result, expected);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment