You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to have tested my collection security, for that I have the following:
if (!(typeof MochaWeb === 'undefined')) {
MochaWeb.testOnly(function () {
before(function(done) {
Meteor.logout(function(error) {
if(error) {
testLog.error('problem trying to logout', error.toString());
}
done();
});
});
describe("guest user cannot perform collection operations", function() {
it("guest users cannot insert any data", function() {
// this is an object that complains with Parts SimpleSchema
var newPart = wolfSettings.dataset.partNotInserted;
try {
var result = Parts.insert(newPart);
chai.expect(result).is.not.ok;
} catch(e) {
chai.assert.isTrue(false, "exception was thrown " + e.message);
}
});
});
});
}
The problem is the tests is always failing, Part seems to be inserted into the database.
"exception was thrown expected 'yGu4Nu3G6N9MisAkC' to be falsy: expected false to be true"
Is the meteor mirror copying the collections without the allow security defined on the main collection?
Many thanks,
Diego B.
The text was updated successfully, but these errors were encountered:
Hello everybody.
I'm trying to have tested my collection security, for that I have the following:
if (!(typeof MochaWeb === 'undefined')) {
MochaWeb.testOnly(function () {
});
}
The problem is the tests is always failing, Part seems to be inserted into the database.
"exception was thrown expected 'yGu4Nu3G6N9MisAkC' to be falsy: expected false to be true"
Is the meteor mirror copying the collections without the allow security defined on the main collection?
Many thanks,
Diego B.
The text was updated successfully, but these errors were encountered: