Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added features #90

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ language: objective-c
before_install:
- brew update
- brew upgrade xctool
- gem install cocoapods -v '0.32.1'
- gem install cocoapods -v '0.34.4'
- echo -e "Host *\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
- pod repo add cloudspace https://github.com/cloudspace/Cloudspace-iOS-PodSpecs.git
script:
- xctool -workspace EasyReader.xcworkspace -scheme Development -sdk iphonesimulator7.1 ONLY_ACTIVE_ARCH=NO
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

@interface EZRFeedItemUpdateService (Test)

- (void)requestFiveMinutesOfFeedItems:(id)sender;
- (void)requestOneWeekOfFeedItems;
- (void)requestFeedItemsSince:(NSDate *)since;
+ (void)requestFiveMinutesOfFeedItems:(id)sender;
+ (void)requestOneWeekOfFeedItems;
+ (void)requestFeedItemsSince:(NSDate *)since;
- (void)loadDefaultFeeds;
- (BOOL)hasSetDefaultFeeds;

Expand Down Expand Up @@ -49,31 +49,34 @@ - (void)tearDown

- (void)testRequestFiveMinutesOfFeedItems
{
[[partialMockService expect] requestFeedItemsSince:[OCMArg any]];
[[[mockService expect] classMethod] requestFeedItemsSince:[OCMArg any]];

[partialMockService requestFiveMinutesOfFeedItems:[OCMArg any]];
[partialMockService verify];
[[mockService class] requestFiveMinutesOfFeedItems:[OCMArg any]];

[mockService verify];
}

- (void)testRequestOneWeekOfFeedItems
{
[[partialMockService expect] requestFeedItemsSince:[OCMArg any]];
[[[mockService expect] classMethod] requestFeedItemsSince:[OCMArg any]];

[partialMockService requestOneWeekOfFeedItems];
[partialMockService verify];
[[mockService class] requestOneWeekOfFeedItems];

[mockService verify];
}

- (void)testRequestFeedItemsSince
{
id date = [OCMockObject mockForClass:[NSDate class]];

[[mockFeedItem expect] requestFeedItemsFromFeeds:[OCMArg any]
since:date
success:[OCMArg any]
failure:[OCMArg any]];
[[[mockFeedItem expect] classMethod] requestFeedItemsFromFeeds:[OCMArg any]
since:date
success:[OCMArg any]
failure:[OCMArg any]];

[partialMockService requestFeedItemsSince:date];
[partialMockService verify];
[[mockService class] requestFeedItemsSince:date];

[mockService verify];
}

- (void)testLoadDefaultFeeds
Expand Down
Loading