cozy / cozy-emails

Email Client for Cozy
GNU Affero General Public License v3.0
66 stars 41 forks source link

[tests] Add tests for router store #870

Closed frankrousseau closed 8 years ago

frankrousseau commented 8 years ago

Here are unit tests for the route store.

I skipped three tests:

misstick commented 8 years ago

@frankrousseau : gotoNextConversation get the next conversation of the current message into the message list. Into messageStore only messages are saved; the conversations are not natural: we have to find the next message with a different conversationID. Is it clearer?

Same pattern for getPreviousConversation.

frankrousseau commented 8 years ago

Ok thanks. So, it looks broken. When I get next conversation, it always returns the same message whatever the conversation it belongs to.

misstick commented 8 years ago

@frankrousseau : ACCOUNT_CREATION_SUCCESS doesnt exist; you mean ADD_ACCOUNT_SUCCESS?

frankrousseau commented 8 years ago

Sorry but no, the convention for Cozy javascript files is two-spaces indentation.

frankrousseau commented 8 years ago

Thanks for the review and comments. I will handle or answer to all of them soon.

frankrousseau commented 8 years ago

I think I handled all your comments by fixing code or answering them. Before asking for another review, I need to add ROUTE_CHANGE tests and try again to do getNextConversation and getPreviousConversation tests.

frankrousseau commented 8 years ago

I added the missing tests. I think we can go for the merge. I will open another PR soon to make sure that everything runs well with the recent changes made on the store.

misstick commented 8 years ago

@frankrousseau: sorry for the delay, I have missed your comment; i'll check this today.

misstick commented 8 years ago

@frankrousseau: Except my last comments, everything is OK to me; i'm waiting for your answers et eventually changes and then I could merge 👍