Skip to content

Commit

Permalink
Fix failing JS test for adva_assets
Browse files Browse the repository at this point in the history
  • Loading branch information
Luca Guidi committed Jun 23, 2009
1 parent b3495e9 commit 19f7558
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions engines/adva_assets/test/javascript/unit/admin/asset_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,19 @@ test("should add tags when click on 'tagall_files' and input has existing tags",
equals(TestUtils.lastFileRow().find("input:last").val(), "rails " + TestUtils.defaultTags);
});

module("BUCKET");
test("should add to bucket", function() {
Assets.addToBucket($(".add_asset"), false);
ok($('#bucket_assets').children().size() > 0, "#bucket_assets should be empty.");
equals($("#flash_notice").html(), "rails.png assigned to this bucket.");
});

test("should clear the bucket", function() {
Assets.addToBucket($("#clear_bucket"), false);
equals($('#bucket_assets').children().size(), 0, "#bucket_assets shouldn't be empty.");
equals($("#flash_notice").html(), "Asset bucket has been cleared.");
});

module("ASSET TOOLS");
test("should show assets tools when mouse is over an asset preview", function(){
ok(!TestUtils.assetTools().is(":visible"), "asset tools should be hidden by default");
Expand All @@ -133,16 +146,3 @@ test("should delete the asset", function() {
equals($("#flash_notice").html(), "'rails.png' was deleted.");
equals($("#upload_summary").html(), TestUtils.uploadSummary);
});

module("BUCKET");
test("should add to bucket", function() {
Assets.addToBucket($(".add_asset"), false);
ok($('#bucket_assets').children().size() > 0, "#bucket_assets should be empty.");
equals($("#flash_notice").html(), "rails.png assigned to this bucket.");
});

test("should clear the bucket", function() {
Assets.addToBucket($("#clear_bucket"), false);
equals($('#bucket_assets').children().size(), 0, "#bucket_assets shouldn't be empty.");
equals($("#flash_notice").html(), "Asset bucket has been cleared.");
});

0 comments on commit 19f7558

Please sign in to comment.