diff options
author | Reverite <github@reverite.sh> | 2019-11-21 21:52:48 -0500 |
---|---|---|
committer | Reverite <github@reverite.sh> | 2019-11-21 21:52:48 -0500 |
commit | 37a9551c3fe59dd1f50a363ce2532c5f00fdf228 (patch) | |
tree | c3972adfaaf33034bd9efd069881a2090f35e912 /spec/controllers/api | |
parent | b2c43eeece54980657875b29507e503531b010de (diff) | |
parent | 55f5e81a9dc4c6cede5d43e549061be2ea9be614 (diff) |
Merge branch 'glitch' into production
Diffstat (limited to 'spec/controllers/api')
-rw-r--r-- | spec/controllers/api/v1/accounts/credentials_controller_spec.rb | 13 | ||||
-rw-r--r-- | spec/controllers/api/v1/bookmarks_controller_spec.rb | 2 |
2 files changed, 14 insertions, 1 deletions
diff --git a/spec/controllers/api/v1/accounts/credentials_controller_spec.rb b/spec/controllers/api/v1/accounts/credentials_controller_spec.rb index e9466e4ed..4fa6fbcf4 100644 --- a/spec/controllers/api/v1/accounts/credentials_controller_spec.rb +++ b/spec/controllers/api/v1/accounts/credentials_controller_spec.rb @@ -59,6 +59,19 @@ describe Api::V1::Accounts::CredentialsController do end end + describe 'with empty source list' do + before do + patch :update, params: { + display_name: "I'm a cat", + source: {}, + }, as: :json + end + + it 'returns http success' do + expect(response).to have_http_status(200) + end + end + describe 'with invalid data' do before do note = 'This is too long. ' diff --git a/spec/controllers/api/v1/bookmarks_controller_spec.rb b/spec/controllers/api/v1/bookmarks_controller_spec.rb index 79601b6e6..d7c5847b0 100644 --- a/spec/controllers/api/v1/bookmarks_controller_spec.rb +++ b/spec/controllers/api/v1/bookmarks_controller_spec.rb @@ -64,7 +64,7 @@ RSpec.describe Api::V1::BookmarksController, type: :controller do get :index, params: { limit: 1 } expect(response.headers['Link'].find_link(['rel', 'next']).href).to eq "http://test.host/api/v1/bookmarks?limit=1&max_id=#{bookmark.id}" - expect(response.headers['Link'].find_link(['rel', 'prev']).href).to eq "http://test.host/api/v1/bookmarks?limit=1&since_id=#{bookmark.id}" + expect(response.headers['Link'].find_link(['rel', 'prev']).href).to eq "http://test.host/api/v1/bookmarks?limit=1&min_id=#{bookmark.id}" end it 'does not add pagination headers if not necessary' do |