summaryrefslogtreecommitdiff
path: root/spec/javascripts
diff options
context:
space:
mode:
authormo k <mo@mokhan.ca>2012-10-02 07:02:14 -0600
committermo k <mo@mokhan.ca>2012-10-02 07:02:14 -0600
commitdbc3f7797af66287f48d827b00fd888214a7d2fe (patch)
tree39fed0b0b70ca1f4f7a1da5b34fca078e857fc30 /spec/javascripts
parent94705107d78b92a6f9499b83517b8071a95ea16a (diff)
add author and author url to the new tutorial page.
Diffstat (limited to 'spec/javascripts')
-rw-r--r--spec/javascripts/presenters/new_tutorial_presenter_spec.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/spec/javascripts/presenters/new_tutorial_presenter_spec.js b/spec/javascripts/presenters/new_tutorial_presenter_spec.js
index 3b8bb836..c0b9592e 100644
--- a/spec/javascripts/presenters/new_tutorial_presenter_spec.js
+++ b/spec/javascripts/presenters/new_tutorial_presenter_spec.js
@@ -11,6 +11,8 @@ describe ("NewTutorialPresenter", function() {
description: $('<p>'),
image: $('<img>'),
hidden_image_url: $('<input type="hidden">'),
+ author: $('<input type="text">'),
+ author_url: $('<input type="text">'),
}
};
service = {
@@ -73,11 +75,19 @@ describe ("NewTutorialPresenter", function() {
it ("should update the hidden input image url", function() {
expect(view.preview.hidden_image_url.val()).toEqual('http://');
});
+ it ("should display the author name", function() {
+ expect(view.preview.author.val()).toEqual('superman');
+ });
+ it ("should display the author url", function() {
+ expect(view.preview.author_url.val()).toEqual('http://www.superman.com');
+ });
beforeEach (function() {
var payload = {
title: 'the title',
description: 'the description',
- thumbnail_url: 'http://'
+ thumbnail_url: 'http://',
+ provider_url: 'http://www.superman.com',
+ provider_name: 'superman'
};
sut.display_url_info(payload);
});