dawarich/spec/requests/points_spec.rb
2024-03-16 00:01:00 +01:00

25 lines
501 B
Ruby

require 'rails_helper'
RSpec.describe "Points", type: :request do
describe "GET /index" do
context 'when user signed in' do
before do
sign_in create(:user)
end
it "returns http success" do
get points_path
expect(response).to have_http_status(:success)
end
end
context 'when user not signed in' do
it "returns http success" do
get points_path
expect(response).to have_http_status(302)
end
end
end
end