From dbc3f7797af66287f48d827b00fd888214a7d2fe Mon Sep 17 00:00:00 2001 From: mo k Date: Tue, 2 Oct 2012 07:02:14 -0600 Subject: add author and author url to the new tutorial page. --- spec/javascripts/presenters/new_tutorial_presenter_spec.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'spec/javascripts') 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: $('

'), image: $(''), hidden_image_url: $(''), + author: $(''), + author_url: $(''), } }; 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); }); -- cgit v1.2.3