Skip to content

Commit

Permalink
Added a unit test for update message links
Browse files Browse the repository at this point in the history
  • Loading branch information
sbosley committed Dec 12, 2012
1 parent 961a4a0 commit 3a9d122
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/src/com/todoroo/astrid/service/UpdateMessageServiceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,24 @@ String getUpdates(String url) throws IOException {
};
}

public void testUpdateWithLinks() {
clearLatestUpdates();

new TestUpdateMessageService() {
@Override
void verifyMessage(MessageTuple message) {
assertEquals("Message", message.message);
assertEquals("link", message.linkText.get(0));
assertNotNull(message.click.get(0));
}

@Override
String getUpdates(String url) throws IOException {
return "[{message:'Message', links:[{title:'link',url:'http://astrid.com'}]]";
}
};
}

// ---

private void clearLatestUpdates() {
Expand Down

0 comments on commit 3a9d122

Please sign in to comment.