Merge branch 'master' into glitch-soc/merge-upstream
Conflicts: - README.md discarded upstream changes - app/controllers/api/v1/bookmarks_controller.rb finally merged upstream, some code style fixes and slightly changed pagination code - app/controllers/application_controller.rb changed upstream to always return HTML error pages slight conflict caused by theming code - app/models/bookmark.rb finally merged upstream, no real conflict - spec/controllers/api/v1/bookmarks_controller_spec.rb finally merged upstream, slightly changed pagination code
This commit is contained in:
commit
ff67385cfb
953 changed files with 9201 additions and 2699 deletions
|
@ -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. '
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue