質問編集履歴

2

試したことを修正

2022/02/28 09:29

投稿

uichiyy
uichiyy

スコア47

test CHANGED
File without changes
test CHANGED
@@ -6,10 +6,7 @@
6
6
 
7
7
  ```ruby
8
8
  RSpec.describe 'Api::User', type: :request do
9
- describe 'GET api/user/:id' do
10
- before do
11
- get 'api/user/1'
12
- end
9
+ desc
13
10
  context '正しいアクセストークン' do
14
11
  it 'okステータス'
15
12
  cookies[:access_token] = {
@@ -18,6 +15,7 @@
18
15
  secure: false,
19
16
  http_only: true,
20
17
  }
18
+ get 'api/user/1'
21
19
  expect(response).to have_http_status(:ok)
22
20
  end
23
21
  end

1

タイトルを変更

2022/02/28 08:49

投稿

uichiyy
uichiyy

スコア47

test CHANGED
@@ -1 +1 @@
1
- Request SpecでCookieを送信する方法を知りたい
1
+ Request SpecでCookieを設定する方法を知りたい
test CHANGED
File without changes