summaryrefslogtreecommitdiff
path: root/spec/javascripts/presenters/new_tutorial_presenter_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/javascripts/presenters/new_tutorial_presenter_spec.js')
-rw-r--r--spec/javascripts/presenters/new_tutorial_presenter_spec.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/javascripts/presenters/new_tutorial_presenter_spec.js b/spec/javascripts/presenters/new_tutorial_presenter_spec.js
new file mode 100644
index 00000000..f98cf418
--- /dev/null
+++ b/spec/javascripts/presenters/new_tutorial_presenter_spec.js
@@ -0,0 +1,17 @@
+describe ("NewTutorialPresenter", function() {
+ beforeEach (function() {
+ view = {add_tag:null};
+ sut = new NewTutorialPresenter(view);
+ });
+ var sut;
+ var view;
+ describe ("when a new tag is added", function() {
+ it ("should add the new tag to the list of tags", function() {
+ expect(view.add_tag).toHaveBeenCalledWith('<li><a href="#" class="label">blah</a></li>');
+ });
+ beforeEach (function() {
+ spyOn(view, 'add_tag');
+ sut.add_tag('blah');
+ });
+ });
+});