-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Retrieve a feed, and unsubscribe from a subscription
- Loading branch information
Showing
3 changed files
with
34 additions
and
7 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,15 +25,29 @@ | |
end | ||
end | ||
|
||
describe '.unsubscribe' do | ||
it 'should unsubscribe and return a 204' do | ||
stub_request(:delete, "https://email:[email protected]/v2/subscriptions/260815.json").to_return(status: 204) | ||
@feedbin.unsubscribe(260815).should == 204 | ||
end | ||
end | ||
|
||
describe '.feed' do | ||
it 'should get feed and return a 200' do | ||
stub_request(:get, "https://email:[email protected]/v2/feeds/1.json").to_return(status: 200) | ||
@feedbin.feed(1).code.should == 200 | ||
end | ||
end | ||
|
||
describe '.star' do | ||
it 'should star a post and return a 200' do | ||
stub_request(:post, "https://email:[email protected]/v2/starred_entries.json").to_return(status: 200) | ||
@feedbin.star(33).code.should == 200 | ||
@feedbin.star(33).should == 200 | ||
end | ||
|
||
it 'should star an array of posts and return a 200' do | ||
stub_request(:post, "https://email:[email protected]/v2/starred_entries.json").to_return(status: 200) | ||
@feedbin.star([33,44,55,66,77]).code.should == 200 | ||
@feedbin.star([33,44,55,66,77]).should == 200 | ||
end | ||
end | ||
end |