From 2edfdab6e6d70598a19d59f8a2f47ecae8add243 Mon Sep 17 00:00:00 2001
From: Yamagishi Kazutoshi <ykzts@desire.sh>
Date: Fri, 18 Aug 2017 17:42:59 +0900
Subject: Don't send Link header when don't know prev and next links (#4633)

---
 spec/controllers/api/v1/favourites_controller_spec.rb | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

(limited to 'spec')

diff --git a/spec/controllers/api/v1/favourites_controller_spec.rb b/spec/controllers/api/v1/favourites_controller_spec.rb
index 3de045377..46cf70f4d 100644
--- a/spec/controllers/api/v1/favourites_controller_spec.rb
+++ b/spec/controllers/api/v1/favourites_controller_spec.rb
@@ -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
-- 
cgit