Skip to content
Snippets Groups Projects
Commit 10ba09f5 authored by Eugen Rochko's avatar Eugen Rochko
Browse files

Upgrade to Rails 5.0.0.1

parent ff2cbc07
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,7 @@ RSpec.describe Auth::SessionsController, type: :controller do
before do
request.env["devise.mapping"] = Devise.mappings[:user]
post :create, user: { email: user.email, password: user.password }
post :create, params: { user: { email: user.email, password: user.password } }
end
it 'redirects to home page' do
......
......@@ -3,7 +3,7 @@ require 'rails_helper'
RSpec.describe SettingsController, type: :controller do
before do
sign_in :user, Fabricate(:user)
sign_in Fabricate(:user), scope: :user
end
describe "GET #show" do
......
......@@ -4,13 +4,13 @@ RSpec.describe StatusesController, type: :controller do
let(:user) { Fabricate(:user) }
before do
sign_in :user, user
sign_in user, scope: :user
end
describe 'POST #create' do
before do
stub_request(:post, "https://pubsubhubbub.superfeedr.com/").to_return(:status => 200, :body => "", :headers => {})
post :create, status: { text: 'Hello world' }
post :create, params: { status: { text: 'Hello world' } }
end
it 'redirects back to homepage' do
......
......@@ -6,12 +6,12 @@ RSpec.describe StreamEntriesController, type: :controller do
describe 'GET #show' do
it 'returns http success with HTML' do
get :show, account_username: alice.username, id: status.stream_entry.id
get :show, params: { account_username: alice.username, id: status.stream_entry.id }
expect(response).to have_http_status(:success)
end
it 'returns http success with Atom' do
get :show, account_username: alice.username, id: status.stream_entry.id, format: 'atom'
get :show, params: { account_username: alice.username, id: status.stream_entry.id }, format: 'atom'
expect(response).to have_http_status(:success)
end
end
......
......@@ -12,12 +12,12 @@ RSpec.describe XrdController, type: :controller do
let(:alice) { Fabricate(:account, username: 'alice') }
it 'returns http success when account can be found' do
get :webfinger, resource: "acct:#{alice.username}@anything.com"
get :webfinger, params: { resource: "acct:#{alice.username}@anything.com" }
expect(response).to have_http_status(:success)
end
it 'returns http not found when account cannot be found' do
get :webfinger, resource: 'acct:not@existing.com'
get :webfinger, params: { resource: 'acct:not@existing.com' }
expect(response).to have_http_status(:not_found)
end
end
......
Fabricator(:account) do
username "alice"
end
......@@ -17,7 +17,7 @@ RSpec.configure do |config|
config.infer_spec_type_from_file_location!
config.filter_rails_from_backtrace!
config.include Devise::TestHelpers, type: :controller
config.include Devise::Test::ControllerHelpers, type: :controller
config.include Devise::TestHelpers, type: :view
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment