Merge commit 'b9f59ebcc68e9da0a7158741a1a2ef3564e1321e' into merging-upstream
This commit is contained in:
@ -50,14 +50,14 @@ describe Api::V1::Accounts::RelationshipsController do
|
||||
json = body_as_json
|
||||
|
||||
expect(json).to be_a Enumerable
|
||||
expect(json.first[:id]).to eq simon.id
|
||||
expect(json.first[:id]).to eq simon.id.to_s
|
||||
expect(json.first[:following]).to be true
|
||||
expect(json.first[:followed_by]).to be false
|
||||
expect(json.first[:muting]).to be false
|
||||
expect(json.first[:requested]).to be false
|
||||
expect(json.first[:domain_blocking]).to be false
|
||||
|
||||
expect(json.second[:id]).to eq lewis.id
|
||||
expect(json.second[:id]).to eq lewis.id.to_s
|
||||
expect(json.second[:following]).to be false
|
||||
expect(json.second[:followed_by]).to be true
|
||||
expect(json.second[:muting]).to be false
|
||||
|
18
spec/controllers/api/v1/custom_emojis_controller_spec.rb
Normal file
18
spec/controllers/api/v1/custom_emojis_controller_spec.rb
Normal file
@ -0,0 +1,18 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::V1::CustomEmojisController, type: :controller do
|
||||
render_views
|
||||
|
||||
describe 'GET #index' do
|
||||
before do
|
||||
Fabricate(:custom_emoji)
|
||||
get :index
|
||||
end
|
||||
|
||||
it 'returns http success' do
|
||||
expect(response).to have_http_status(:success)
|
||||
end
|
||||
end
|
||||
end
|
@ -53,7 +53,7 @@ RSpec.describe Api::V1::MediaController, type: :controller do
|
||||
end
|
||||
|
||||
it 'returns media ID in JSON' do
|
||||
expect(body_as_json[:id]).to eq MediaAttachment.first.id
|
||||
expect(body_as_json[:id]).to eq MediaAttachment.first.id.to_s
|
||||
end
|
||||
end
|
||||
|
||||
@ -75,7 +75,7 @@ RSpec.describe Api::V1::MediaController, type: :controller do
|
||||
end
|
||||
|
||||
it 'returns media ID in JSON' do
|
||||
expect(body_as_json[:id]).to eq MediaAttachment.first.id
|
||||
expect(body_as_json[:id]).to eq MediaAttachment.first.id.to_s
|
||||
end
|
||||
end
|
||||
|
||||
@ -97,7 +97,7 @@ RSpec.describe Api::V1::MediaController, type: :controller do
|
||||
end
|
||||
|
||||
xit 'returns media ID in JSON' do
|
||||
expect(body_as_json[:id]).to eq MediaAttachment.first.id
|
||||
expect(body_as_json[:id]).to eq MediaAttachment.first.id.to_s
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -36,7 +36,7 @@ describe Api::V1::Statuses::FavouritesController do
|
||||
it 'return json with updated attributes' do
|
||||
hash_body = body_as_json
|
||||
|
||||
expect(hash_body[:id]).to eq status.id
|
||||
expect(hash_body[:id]).to eq status.id.to_s
|
||||
expect(hash_body[:favourites_count]).to eq 1
|
||||
expect(hash_body[:favourited]).to be true
|
||||
end
|
||||
|
@ -32,7 +32,7 @@ describe Api::V1::Statuses::PinsController do
|
||||
it 'return json with updated attributes' do
|
||||
hash_body = body_as_json
|
||||
|
||||
expect(hash_body[:id]).to eq status.id
|
||||
expect(hash_body[:id]).to eq status.id.to_s
|
||||
expect(hash_body[:pinned]).to be true
|
||||
end
|
||||
end
|
||||
|
@ -36,7 +36,7 @@ describe Api::V1::Statuses::ReblogsController do
|
||||
it 'return json with updated attributes' do
|
||||
hash_body = body_as_json
|
||||
|
||||
expect(hash_body[:reblog][:id]).to eq status.id
|
||||
expect(hash_body[:reblog][:id]).to eq status.id.to_s
|
||||
expect(hash_body[:reblog][:reblogs_count]).to eq 1
|
||||
expect(hash_body[:reblog][:reblogged]).to be true
|
||||
end
|
||||
|
Reference in New Issue
Block a user