2021-03-22 03:16:29 +01:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2021-03-20 20:02:37 +01:00
|
|
|
require 'rails_helper'
|
|
|
|
|
|
|
|
RSpec.describe ApplicationController do
|
|
|
|
describe 'current_user' do
|
|
|
|
before(:all) do
|
2021-03-21 14:44:59 +01:00
|
|
|
User.create(email: 'test2@example.com', password: 'abcde')
|
2021-03-20 20:02:37 +01:00
|
|
|
end
|
|
|
|
context 'when a user is logged in' do
|
|
|
|
it 'returns the user' do
|
|
|
|
# TODO
|
2021-03-21 14:44:59 +01:00
|
|
|
# expect(current_user.email).to eql('test2@example.com')
|
2021-03-20 20:02:37 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
describe 'logged_in?' do
|
|
|
|
# TODO
|
|
|
|
end
|
2021-03-22 03:16:29 +01:00
|
|
|
end
|