Added test for loading of previous posts on a tag page.
This commit is contained in:
parent
adc9492bf0
commit
8491df1625
1 changed files with 12 additions and 0 deletions
|
|
@ -107,6 +107,18 @@ describe TagsController, :type => :controller do
|
|||
get :show, :name => 'foo', :format => :mobile
|
||||
expect(response).to be_success
|
||||
end
|
||||
|
||||
it "returns the post with the correct age" do
|
||||
post2 = eve.post(
|
||||
:status_message,
|
||||
text: "#what #yes #hellyes #foo tagged second post",
|
||||
public: true,
|
||||
created_at: @post.created_at - 1.day
|
||||
)
|
||||
get :show, name: "what", max_time: @post.created_at, format: :json
|
||||
expect(JSON.parse(response.body).size).to be(1)
|
||||
expect(JSON.parse(response.body).first["guid"]).to eq(post2.guid)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue