Don't send Link header when don't know prev and next links (#4633)

This commit is contained in:
Yamagishi Kazutoshi authored and Eugen Rochko committed 2017-08-18 10:42:59 +02:00
1 parent 4edf9d849f
commit 2edfdab6e6
2 files changed
+2 -3

No files matched your search

@@ -70,8 +70,7 @@ RSpec.describe Api::V1::FavouritesController, type: :controller do
it 'does not add pagination headers if not necessary' do
get :index
expect(response.headers['Link'].find_link(['rel', 'next'])).to eq nil
expect(response.headers['Link'].find_link(['rel', 'prev'])).to eq nil
expect(response.headers['Link']).to eq nil
end
end
end