Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge branch 'master' of github.com:hakanson/tccc11

  • Loading branch information...
commit 7417aee2b8d332c005c48a4cb66a247e5e700f5c 2 parents c46124e + 6ca5dc7
Kevin Hakanson authored

Showing 2 changed files with 14 additions and 2 deletions. Show diff stats Hide diff stats

  1. +1 0  tests/TestRunner.html
  2. +13 2 tests/jquery-hub.tests.js
1  tests/TestRunner.html
@@ -2,6 +2,7 @@
2 2 <html>
3 3 <head>
4 4 <title>$.hub Test Runner</title>
  5 + <meta http-equiv="X-UA-Compatible" content="IE=edge" />
5 6 <script type="text/javascript">window.JSON || document.write('<script src="../JSON/json2.js"><\/script>')</script>
6 7 <script type="text/javascript" src="../jquery-1.6.3.js"></script>
7 8 <link rel="stylesheet" href="qunit.css" type="text/css" media="screen"/>
15 tests/jquery-hub.tests.js
@@ -455,14 +455,25 @@ test( "only receive same message once", function() {
455 455 subscriber1 = $.hub.subscribe( channel, callback1, null, null, createIdempotentFilter() );
456 456 subscriber2 = $.hub.subscribe( channel, callback2, null, null, createIdempotentFilter() );
457 457
  458 + // should only get one of these
458 459 $.hub.publish( channel, m1 );
459 460 $.hub.publish( channel, m1 );
  461 +
  462 + // should only get one of these
460 463 $.hub.publish( channel, m2 );
461 464 $.hub.publish( channel, m2 );
462 465 $.hub.publish( channel, m2 );
463 466
464   - equal( count1, 2 );
465   - equal( count2, 2 );
  467 + // should get both of these (no message id)
  468 + $.hub.publish( channel, null );
  469 + $.hub.publish( channel, null );
  470 +
  471 + // should get both of these (no message id)
  472 + $.hub.publish( channel, {} );
  473 + $.hub.publish( channel, {} );
  474 +
  475 + equal( count1, 6 );
  476 + equal( count2, 6 );
466 477
467 478 $.hub.unsubscribe( subscriber1 );
468 479 $.hub.unsubscribe( subscriber2 );

0 comments on commit 7417aee

Please sign in to comment.
Something went wrong with that request. Please try again.