dawarich/spec/requests/points_spec.rb

26 lines
501 B
Ruby
Raw Normal View History

2024-03-15 18:27:31 -04:00
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
2024-03-15 18:27:31 -04:00
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
2024-03-15 18:27:31 -04:00
end