Clear database before message view tests

This commit is contained in:
Daniel Gasienica 2018-04-03 11:41:40 -04:00
parent 9065b647ad
commit 9c7afab21b

View file

@ -1,17 +1,19 @@
describe('MessageView', function() {
var convo, message;
before(function() {
before(async (done) => {
await clearDatabase();
convo = new Whisper.Conversation({id: 'foo'});
message = convo.messageCollection.add({
conversationId: convo.id,
body: 'hello world',
type: 'outgoing',
source: '+14158675309',
received_at: Date.now()
received_at: Date.now(),
});
return storage.put('number_id', '+18088888888.1');
await storage.put('number_id', '+18088888888.1');
done();
});
it('should display the message text', function() {