IM very new to rspec testing and need alittle bit of help.
Im testing a controller for my timesheet and im trying to test this piece of code.
if params[:user_id] == nil
if current_user == nil
redirect_to new_user_session_path
else
@user_id = current_user.id
end
else
@user_id = params[:user_id]
end
im not sure if its even worth testing but it seems theres a lack of tutorials for the beginner out there, so i wouldnt know. thanks in advance