Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions lessons/08-tests-tasks/twotter/tests/server/testSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
});
});

// why are you requiring everything twice with different paths?? Things are not working...

require('./../../../app'); // to connect to the database
var expect = require('chai').expect;
var User = require('./../../../models/userModel');
Expand All @@ -49,12 +51,15 @@ describe('User Model', function() {
done();
});
});
});


// There wasn't a comma after text. How did you submit this if it wasn't working? Also all describe test suites were not fully completed with brackets..
describe('Twote Model', function() {
it('should create a new twote', function(done) {
var twote = new Twote({
user: 'test_user',
text: 'test_twote_content'
text: 'test_twote_content',
datetime: new Date().toLocaleString()
});
user.save(function(err) {
Expand All @@ -64,12 +69,12 @@ describe('Twote Model', function() {
done();
});
});

});


describe("Twotter App", function(){
it('should return 200 OK on GET /', function(done){
request(app).get('/').expect(200).end(function(err, res){
});
});
})
});