Skip to content

Commit

Permalink
moving newer tests after the older ones previous ones, geddy#325
Browse files Browse the repository at this point in the history
  • Loading branch information
akhoury committed Apr 28, 2013
1 parent 4f1953c commit 62e0c1c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/templates/helpers/helpers.js
Expand Up @@ -124,6 +124,12 @@ tests = {
assert.equal(string, "<select><option data-thing=\"avalue\" value=\"1\">Text 1</option><option data-thing=\"avalue\" value=\"2\">Text 2</option></select>");
}

, 'test select tag with html options': function() {
var choices = [{value: 1, text: "Text 1"}, {value: 2, text: "Text 2"}]
string = helpers.selectTag(choices, 2, {class: 'myclass'});
assert.equal(string, "<select class=\"myclass\"><option value=\"1\">Text 1</option><option selected=\"selected\" value=\"2\">Text 2</option></select>");
}

, 'test select tag with text/attrs and selected option using the seleted param': function() {
var choices = [{value: 1, text: "Text 1", attrs: {data: {thing: "avalue"}}}, {value: 2, text: "Text 2", attrs: {selected: true, data: {thing: "avalue"}}}]
string = helpers.selectTag(choices, 2);
Expand All @@ -142,12 +148,6 @@ tests = {
assert.equal(string, "<select><option data-thing=\"avalue\" value=\"1\">Text 1</option><option data-thing=\"avalue\" selected=\"selected\" value=\"2\">Text 2</option></select>");
}

, 'test select tag with html options': function() {
var choices = [{value: 1, text: "Text 1"}, {value: 2, text: "Text 2"}]
string = helpers.selectTag(choices, 2, {class: 'myclass'});
assert.equal(string, "<select class=\"myclass\"><option value=\"1\">Text 1</option><option selected=\"selected\" value=\"2\">Text 2</option></select>");
}

, 'test single tags in truncateHTML': function () {
var string = helpers.truncateHTML('<p>Once upon a time in a world</p>', { length: 10 });
assert.equal(string, '<p>Once up...</p>');
Expand Down

0 comments on commit 62e0c1c

Please sign in to comment.