Skip to content

Instantly share code, notes, and snippets.

@ciwolsey
Created November 28, 2014 04:14
Show Gist options
  • Select an option

  • Save ciwolsey/9b115e0e7fc6eb4b3b18 to your computer and use it in GitHub Desktop.

Select an option

Save ciwolsey/9b115e0e7fc6eb4b3b18 to your computer and use it in GitHub Desktop.
if (!(typeof MochaWeb === 'undefined')){
MochaWeb.testOnly(function(){
HostLogs.remove({});
describe("Server initialization", function(){
it("should have a Meteor version defined", function(){
chai.assert(Meteor.release);
});
});
describe("HostLogs collection", function(){
it("should exist", function(){
chai.assert(HostLogs);
});
});
describe("The hostlogs", function(){
it("should allow inserting", function(){
var amount = HostLogs.find().count();
HostLogs.insert({ip: "1.1.1.1", port: "80"});
var newAmount = HostLogs.find().count();
chai.expect(newAmount).to.equal(amount + 1);
});
});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment