Skip to content

Commit

Permalink
lotteries_pathへのリスクエストspecを追加
Browse files Browse the repository at this point in the history
  • Loading branch information
OdenTakashi committed Aug 14, 2024
1 parent 0251f04 commit fb7429a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions spec/requests/lotteries_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# frozen_string_literal: true

require 'rails_helper'

RSpec.describe Lottery, type: :request do
describe 'GET /lotteries' do
subject { get lotteries_path }

let(:user) { create(:user) }
let!(:lottery) { create(:lottery, name: 'テストの抽選会', user:) }

it 'return 200 status' do
sign_in user
subject

expect(response).to have_http_status(:ok)
end
end
end

0 comments on commit fb7429a

Please sign in to comment.