Convert Discourse.User to use Discourse.Singleton

This commit is contained in:
Robin Ward
2013-08-08 12:42:08 -04:00
parent 8e1fae0459
commit 51f5cf77fb
23 changed files with 90 additions and 57 deletions

View File

@ -24,7 +24,7 @@ test("uploading one file", function() {
test("new user cannot upload images", function() {
Discourse.SiteSettings.newuser_max_images = 0;
this.stub(Discourse.User, 'current').withArgs("trust_level").returns(0);
this.stub(Discourse.User, 'currentProp').withArgs("trust_level").returns(0);
this.stub(bootbox, "alert");
ok(!validUpload([{name: "image.png"}]));
@ -33,7 +33,7 @@ test("new user cannot upload images", function() {
test("new user cannot upload attachments", function() {
Discourse.SiteSettings.newuser_max_attachments = 0;
this.stub(Discourse.User, 'current').withArgs("trust_level").returns(0);
this.stub(Discourse.User, 'currentProp').withArgs("trust_level").returns(0);
this.stub(bootbox, "alert");
ok(!validUpload([{name: "roman.txt"}]));