質問編集履歴

3

補足

2018/12/05 07:44

投稿

takeke
takeke

スコア60

test CHANGED
File without changes
test CHANGED
@@ -91,3 +91,13 @@
91
91
  expect~~省略
92
92
 
93
93
  ```
94
+
95
+
96
+
97
+ ```rails
98
+
99
+ Failure/Error: create(:recruit, :a)
100
+
101
+ `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).
102
+
103
+ ```

2

補足

2018/12/05 07:44

投稿

takeke
takeke

スコア60

test CHANGED
File without changes
test CHANGED
@@ -53,3 +53,41 @@
53
53
 
54
54
 
55
55
  以上です。何かアドバイスなどいただけると助かりますよろしくお願いいたしますm(__)m
56
+
57
+
58
+
59
+ 補足
60
+
61
+ ```rails
62
+
63
+ require 'rails_helper'
64
+
65
+
66
+
67
+ RSpec.describe "User::Offer", type: :request do
68
+
69
+ describe "GET /user_offer" do
70
+
71
+ let!(:user_token) { create(:user_token) }
72
+
73
+ let!(:offer) { create(:offer_b) }
74
+
75
+ let!(:user) {create(:user)}
76
+
77
+ create(:recruit, :a)}
78
+
79
+ let(:res) { JSON.parse(response.body).deep_symbolize_keys }
80
+
81
+ context "正常系" do
82
+
83
+ it "詳細が有効" do
84
+
85
+ get '/api/user/offers/2', params: {
86
+
87
+ token: "user_token"
88
+
89
+ }
90
+
91
+ expect~~省略
92
+
93
+ ```

1

修正

2018/12/05 07:31

投稿

takeke
takeke

スコア60

test CHANGED
File without changes
test CHANGED
@@ -12,7 +12,7 @@
12
12
 
13
13
  FactoryBot.define do
14
14
 
15
- factory :recruit_a, class: Recruit do do
15
+ factory :recruit_a, class: Recruit do
16
16
 
17
17
  title "title1"
18
18