We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d97f0f4 commit 14e5ffdCopy full SHA for 14e5ffd
lib/cortex/posts.rb
@@ -8,6 +8,10 @@ def feed(params = {})
8
client.get('/posts/feed', params)
9
end
10
11
+ def all_posts(params = {})
12
+ client.get('/posts/feed/all_posts', params)
13
+ end
14
+
15
def get(id)
16
client.get("/posts/#{id}")
17
spec/posts_spec.rb
@@ -42,6 +42,13 @@
42
43
44
45
+ describe :all_posts do
46
+ it 'should correctly make the request' do
47
+ client.expects(:get).with('/posts/feed/all_posts', {}).returns('response')
48
+ expect(client.posts.all_posts()).to eq('response')
49
50
51
52
describe :save do
53
context 'with an existing post' do
54
it 'should correctly make the request' do
0 commit comments