session creation

This commit is contained in:
Karol Selak 2021-03-20 20:02:37 +01:00
parent 0b2bd70f16
commit f8093d2c09
9 changed files with 63 additions and 3 deletions

View file

@ -0,0 +1,18 @@
require 'rails_helper'
RSpec.describe ApplicationController do
describe 'current_user' do
before(:all) do
User.create(username: 'karol.selak@gmail.com', password: 'abcde')
end
context 'when a user is logged in' do
it 'returns the user' do
# TODO
# expect(current_user.username).to eql('karol.selak@gmail.com')
end
end
end
describe 'logged_in?' do
# TODO
end
end