質問編集履歴
3
補足
title
CHANGED
File without changes
|
body
CHANGED
@@ -44,4 +44,9 @@
|
|
44
44
|
token: "user_token"
|
45
45
|
}
|
46
46
|
expect~~省略
|
47
|
+
```
|
48
|
+
|
49
|
+
```rails
|
50
|
+
Failure/Error: create(:recruit, :a)
|
51
|
+
`create` is not available on an example group (e.g. a `describe` or `context` block). It is only available from within individual examples (e.g. `it` blocks) or from constructs that run in the scope of an example (e.g. `before`, `let`, etc).
|
47
52
|
```
|
2
補足
title
CHANGED
File without changes
|
body
CHANGED
@@ -25,4 +25,23 @@
|
|
25
25
|
let!(:recruit) { create(:recruit_c) }
|
26
26
|
などやってみたものの1つしか適用されませんでした。
|
27
27
|
|
28
|
-
以上です。何かアドバイスなどいただけると助かりますよろしくお願いいたしますm(__)m
|
28
|
+
以上です。何かアドバイスなどいただけると助かりますよろしくお願いいたしますm(__)m
|
29
|
+
|
30
|
+
補足
|
31
|
+
```rails
|
32
|
+
require 'rails_helper'
|
33
|
+
|
34
|
+
RSpec.describe "User::Offer", type: :request do
|
35
|
+
describe "GET /user_offer" do
|
36
|
+
let!(:user_token) { create(:user_token) }
|
37
|
+
let!(:offer) { create(:offer_b) }
|
38
|
+
let!(:user) {create(:user)}
|
39
|
+
create(:recruit, :a)}
|
40
|
+
let(:res) { JSON.parse(response.body).deep_symbolize_keys }
|
41
|
+
context "正常系" do
|
42
|
+
it "詳細が有効" do
|
43
|
+
get '/api/user/offers/2', params: {
|
44
|
+
token: "user_token"
|
45
|
+
}
|
46
|
+
expect~~省略
|
47
|
+
```
|
1
修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
例えばですが、今のfactories/recruits.rb
|
6
6
|
```rails
|
7
7
|
FactoryBot.define do
|
8
|
-
factory :recruit_a, class: Recruit do
|
8
|
+
factory :recruit_a, class: Recruit do
|
9
9
|
title "title1"
|
10
10
|
status "default"
|
11
11
|
end
|