mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 14:29:53 +01:00
14 lines
362 B
Ruby
14 lines
362 B
Ruby
# frozen_string_literal: true
|
|
|
|
RSpec.shared_examples_for "requires login" do
|
|
it "redirects to the login page for guests" do
|
|
subject
|
|
expect(response).to redirect_to(new_user_session_path)
|
|
end
|
|
|
|
it "does not redirect to the login page for users" do
|
|
sign_in user
|
|
subject
|
|
expect(response).to_not redirect_to(new_user_session_path)
|
|
end
|
|
end
|