Upgrade to Rails 5.0.0.1

This commit is contained in:
Eugen Rochko
2016-08-17 17:56:23 +02:00
parent ff2cbc0753
commit 10ba09f546
47 changed files with 398 additions and 291 deletions

View File

@ -12,7 +12,7 @@ RSpec.describe Api::Accounts::LookupController, type: :controller do
before do
Fabricate(:account, username: 'bob')
Fabricate(:account, username: 'mcbeth')
get :index, usernames: 'alice,bob,mcbeth'
get :index, params: { usernames: 'alice,bob,mcbeth' }
end
it 'returns http success' do

View File

@ -10,28 +10,28 @@ RSpec.describe Api::AccountsController, type: :controller do
describe 'GET #show' do
it 'returns http success' do
get :show, id: user.account.id
get :show, params: { id: user.account.id }
expect(response).to have_http_status(:success)
end
end
describe 'GET #statuses' do
it 'returns http success' do
get :statuses, id: user.account.id
get :statuses, params: { id: user.account.id }
expect(response).to have_http_status(:success)
end
end
describe 'GET #followers' do
it 'returns http success' do
get :followers, id: user.account.id
get :followers, params: { id: user.account.id }
expect(response).to have_http_status(:success)
end
end
describe 'GET #following' do
it 'returns http success' do
get :following, id: user.account.id
get :following, params: { id: user.account.id }
expect(response).to have_http_status(:success)
end
end
@ -40,7 +40,7 @@ RSpec.describe Api::AccountsController, type: :controller do
let(:other_account) { Fabricate(:account, username: 'bob') }
before do
post :follow, id: other_account.id
post :follow, params: { id: other_account.id }
end
it 'returns http success' do
@ -57,7 +57,7 @@ RSpec.describe Api::AccountsController, type: :controller do
before do
user.account.follow!(other_account)
post :unfollow, id: other_account.id
post :unfollow, params: { id: other_account.id }
end
it 'returns http success' do

View File

@ -18,7 +18,7 @@ RSpec.describe Api::FollowsController, type: :controller do
stub_request(:post, "https://quitter.no/main/salmon/user/7477").to_return(:status => 200, :body => "", :headers => {})
stub_request(:post, "https://pubsubhubbub.superfeedr.com/").to_return(:status => 200, :body => "", :headers => {})
post :create, uri: 'gargron@quitter.no'
post :create, params: { uri: 'gargron@quitter.no' }
end
it 'returns http success' do

View File

@ -13,7 +13,7 @@ RSpec.describe Api::SalmonController, type: :controller do
describe 'POST #update' do
before do
request.env['RAW_POST_DATA'] = File.read(File.join(Rails.root, 'spec', 'fixtures', 'salmon', 'mention.xml'))
post :update, id: account.id
post :update, params: { id: account.id }
end
it 'returns http success' do

View File

@ -12,7 +12,7 @@ RSpec.describe Api::StatusesController, type: :controller do
let(:status) { Fabricate(:status, account: user.account) }
it 'returns http success' do
get :show, id: status.id
get :show, params: { id: status.id }
expect(response).to have_http_status(:success)
end
end

View File

@ -5,7 +5,7 @@ RSpec.describe Api::SubscriptionsController, type: :controller do
describe 'GET #show' do
before do
get :show, :id => account.id, 'hub.topic' => 'topic_url', 'hub.verify_token' => 123, 'hub.challenge' => '456'
get :show, params: { :id => account.id, 'hub.topic' => 'topic_url', 'hub.verify_token' => 123, 'hub.challenge' => '456' }
end
it 'returns http success' do
@ -26,7 +26,7 @@ RSpec.describe Api::SubscriptionsController, type: :controller do
request.env['HTTP_X_HUB_SIGNATURE'] = "sha1=#{OpenSSL::HMAC.hexdigest('sha1', 'abc', feed)}"
request.env['RAW_POST_DATA'] = feed
post :update, id: account.id
post :update, params: { id: account.id }
end
it 'returns http created' do