bookstore/spec/controllers/application_controller_spec.rb
2021-03-22 03:16:29 +01:00

20 lines
442 B
Ruby

# frozen_string_literal: true
require 'rails_helper'
RSpec.describe ApplicationController do
describe 'current_user' do
before(:all) do
User.create(email: 'test2@example.com', password: 'abcde')
end
context 'when a user is logged in' do
it 'returns the user' do
# TODO
# expect(current_user.email).to eql('test2@example.com')
end
end
end
describe 'logged_in?' do
# TODO
end
end