bookstore/spec/controllers/application_controller_spec.rb

21 lines
442 B
Ruby
Raw Permalink Normal View History

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
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
# 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