mirror of
https://github.com/samsonjs/instapaper.git
synced 2026-04-27 14:57:44 +00:00
Merge pull request #7 from vesan/fix-bookmark-list-bookmarks-not-being-coerced
Coerce BookmarkList bookmarks to correct format
This commit is contained in:
commit
9c109f0da0
2 changed files with 10 additions and 0 deletions
|
|
@ -60,6 +60,11 @@ module Instapaper
|
||||||
if response.key?('hash')
|
if response.key?('hash')
|
||||||
response['instapaper_hash'] = response.delete('hash')
|
response['instapaper_hash'] = response.delete('hash')
|
||||||
end
|
end
|
||||||
|
if response.key?('bookmarks')
|
||||||
|
response['bookmarks'] = response['bookmarks'].collect {|bookmark|
|
||||||
|
coerce_hash(bookmark)
|
||||||
|
}
|
||||||
|
end
|
||||||
response
|
response
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,11 @@ describe Instapaper::Client::Bookmarks do
|
||||||
expect(bookmark).to be_an Instapaper::Bookmark
|
expect(bookmark).to be_an Instapaper::Bookmark
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'coerces bookmarks correctly' do
|
||||||
|
list = client.bookmarks
|
||||||
|
expect(list.bookmarks.first.instapaper_hash).to_not be_nil
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe '#update_read_progress' do
|
describe '#update_read_progress' do
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue