o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1350920221.187544:@value"R{I"
class:EFI"ProcessedAsset; FI"logical_path; FI".organization_dashboard_controller_spec.js; FI"
pathname; FI"s/Users/adamdoeler/Sites/bigbang/woople-theme/spec/javascripts/organization_dashboard_controller_spec.js.coffee; FI"content_type; FI"application/javascript; FI"
mtime; FI"2012-10-22T11:15:49-04:00; FI"length; Fi”I"digest; F"%556695558fd080bb4f68d654adfd87c4I"source; FI"”(function() {
describe('OrganizationDashboardController', function() {
beforeEach(function() {
$('body').html('
');
return this.sut = new OrganizationDashboardController();
});
describe('init', function() {
return it('sets up the listeners', function() {
var callback, listenersStub;
callback = {
reminderCallback: 'foo'
};
listenersStub = sinon.stub(this.sut, 'setupListeners');
this.sut.init(callback);
return expect(listenersStub).to.have.been.calledOnce;
});
});
describe('setupListeners', function() {
beforeEach(function() {
this.mobileStub = sinon.stub(this.sut, 'mobileSetup');
this.buttonsStub = sinon.stub(this.sut, 'bindReminderButtons');
return this.sut.setupListeners();
});
it('sets up mobile', function() {
return expect(this.mobileStub).to.have.been.calledOnce;
});
return it('binds reminder buttons', function() {
return expect(this.buttonsStub).to.have.been.calledOnce;
});
});
describe('mobileSetup', function() {
it('switches the button when on a small screen', function() {
sinon.stub(this.sut, 'isPhone').returns(true);
this.sut.mobileSetup();
return expect($('#organization-accounts button').hasClass('btn-large')).to.be["true"];
});
return it('does not switch the button on other screens', function() {
sinon.stub(this.sut, 'isPhone').returns(false);
sinon.stub(this.sut, 'createPopover');
this.sut.mobileSetup();
return expect($('#organization-accounts button').hasClass('btn-large')).to.be["false"];
});
});
describe('bindReminderButtons', function() {
return it('binds the callback to the click event', function() {
var callbackSpy, options;
callbackSpy = sinon.spy();
options = {
reminderCallback: callbackSpy
};
sinon.stub(this.sut, 'createPopover');
this.sut.init(options);
$('#organization-accounts .remind-column .btn').first().click();
return expect(callbackSpy).to.have.been.calledOnce;
});
});
describe('log', function() {
beforeEach(function() {
return sinon.stub(this.sut, 'setupListeners');
});
it('writes to the console when debugging is enabled', function() {
var stub;
stub = sinon.stub(console, 'log').returns(true);
this.sut.init({
reminderCallback: 'foo'
}, true);
expect(stub).to.have.been.calledOnce;
return stub.restore();
});
return it('does not write to the console when debugging is disabled', function() {
var stub;
stub = sinon.stub(console, 'log').returns(true);
this.sut.init({
reminderCallback: 'foo'
}, false);
expect(stub).to.not.have.been.called;
return stub.restore();
});
});
return describe('isPhone', function() {
it('returns true when the window width is phone sized', function() {
var windowStub;
windowStub = sinon.stub(this.sut, "windowWidth").returns(480);
expect(this.sut.isPhone()).to.be["true"];
windowStub.restore();
windowStub = sinon.stub(this.sut, "windowWidth").returns(280);
expect(this.sut.isPhone()).to.be["true"];
return windowStub.restore();
});
return it('returns false when the window is not phone sized', function() {
var windowStub;
windowStub = sinon.stub(this.sut, 'windowWidth').returns(1000);
expect(this.sut.isPhone()).to.be["false"];
windowStub.restore();
windowStub = sinon.stub(this.sut, 'windowWidth').returns(481);
return expect(this.sut.isPhone()).to.be["false"];
});
});
});
}).call(this);
; TI"dependency_digest; F"%fdaa50e79b40db2026544dc2e578aa96I"required_paths; F[
I"l/Users/adamdoeler/.rvm/gems/ruby-1.9.3-p194/gems/jquery-rails-2.1.3/vendor/assets/javascripts/jquery.js; FI"l/Users/adamdoeler/.rvm/gems/ruby-1.9.3-p194/gems/sinon-rails-1.4.2.1/vendor/assets/javascripts/sinon.js; FI"d/Users/adamdoeler/Sites/bigbang/woople-theme/vendor/assets/javascripts/sinon-chai/sinon-chai.js; FI"Y/Users/adamdoeler/Sites/bigbang/woople-theme/spec/javascripts/templates/tabs.jst.ejs; FI"X/Users/adamdoeler/Sites/bigbang/woople-theme/spec/javascripts/spec_helper.js.coffee; FI"]/Users/adamdoeler/Sites/bigbang/woople-theme/vendor/assets/javascripts/underscore-min.js; FI"z/Users/adamdoeler/Sites/bigbang/woople-theme/app/assets/javascripts/woople-theme/organization_dashboard_controller.js; FI"s/Users/adamdoeler/Sites/bigbang/woople-theme/spec/javascripts/organization_dashboard_controller_spec.js.coffee; FI"dependency_paths; F[{I" path; FI"s/Users/adamdoeler/Sites/bigbang/woople-theme/spec/javascripts/organization_dashboard_controller_spec.js.coffee; FI"
mtime; FI"2012-10-22T11:15:49-04:00; FI"digest; F"%8fb98fbbc582d0afec4bd703ada11962{I" path; FI"L/Users/adamdoeler/Sites/bigbang/woople-theme/spec/javascripts/templates; FI"
mtime; FI"2012-10-11T16:01:17-04:00; FI"digest; F"%3e529859892b429d7f86a1ed01d51e66{I" path; FI"X/Users/adamdoeler/Sites/bigbang/woople-theme/spec/javascripts/spec_helper.js.coffee; FI"
mtime; FI"2012-10-11T16:01:17-04:00; FI"digest; F"%7ae4f8132c6026d65d0a13f1b18cd8ca{I" path; FI"l/Users/adamdoeler/.rvm/gems/ruby-1.9.3-p194/gems/jquery-rails-2.1.3/vendor/assets/javascripts/jquery.js; FI"
mtime; FI"2012-10-22T11:21:58-04:00; FI"digest; F"%43cde21914c09fcf7ee10c3cf91cb905{I" path; FI"l/Users/adamdoeler/.rvm/gems/ruby-1.9.3-p194/gems/sinon-rails-1.4.2.1/vendor/assets/javascripts/sinon.js; FI"
mtime; FI"2012-10-09T13:37:17-04:00; FI"digest; F"%3975db7dd0993f44f0b2bf44c15e8353{I" path; FI"d/Users/adamdoeler/Sites/bigbang/woople-theme/vendor/assets/javascripts/sinon-chai/sinon-chai.js; FI"
mtime; FI"2012-06-14T12:19:40-04:00; FI"digest; F"%84a21bfc872a9ee86eb35f36da448409{I" path; FI"Y/Users/adamdoeler/Sites/bigbang/woople-theme/spec/javascripts/templates/tabs.jst.ejs; FI"
mtime; FI"2012-10-10T13:45:38-04:00; FI"digest; F"%eef7087b445699495b494635f70b5694{I" path; FI"]/Users/adamdoeler/Sites/bigbang/woople-theme/vendor/assets/javascripts/underscore-min.js; FI"
mtime; FI"2012-10-22T11:15:49-04:00; FI"digest; F"%12298b09dd0de40b9214c47ab0401335{I" path; FI"z/Users/adamdoeler/Sites/bigbang/woople-theme/app/assets/javascripts/woople-theme/organization_dashboard_controller.js; FI"
mtime; FI"2012-10-22T11:15:49-04:00; FI"digest; F"%2ac682f591efa25b9928f68be68d9d38I"
_version; F"%9f3b95dd7ea3030dc35985c0a8020862