Created
June 7, 2013 14:09
-
-
Save chris-dannen/5729520 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it(@"lets you archive an item from the inbox only", ^{ | |
messageStore.mode = MessageStoreInbox; | |
[messageStore addThreadIDs:@[@123, @234, @345]]; | |
messageStore.mode = MessageStoreSent; | |
[[theBlock(^{ [messageStore archiveThreadAtIndex:1u to:1u]; }) should] raise]; | |
messageStore.mode = MessageStoreArchive; | |
[messageStore addThreadIDs:@[@456, @567, @678]]; | |
[[theBlock(^{ [messageStore archiveThreadAtIndex:1u to:1u]; }) should] raise]; | |
messageStore.mode = MessageStoreInbox; | |
[[theBlock(^{ [messageStore archiveThreadAtIndex:10u to:1u]; }) should] raise]; | |
[[theBlock(^{ [messageStore archiveThreadAtIndex:1u to:10u]; }) should] raise]; | |
[messageStore archiveThreadAtIndex:1u to:2u]; | |
[[messageStore.collection should] equal:@[@123, @345]]; | |
messageStore.mode = MessageStoreArchive; | |
[[messageStore.collection should] equal:@[@456, @567, @234, @678]]; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment