-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnotes.txt
More file actions
28 lines (22 loc) · 886 Bytes
/
notes.txt
File metadata and controls
28 lines (22 loc) · 886 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Forum
## 1 Setup
1. Thread
2. Reply
3. User
A. Thread is created by a user.
B. A reply belongs to a thread, and belongs to a user.
# tinker creating threads and replies
$threads = factory(‘App\Thread’, 50)->create();
$threads->each(function($thread){ factory(‘App\Reply’, 10)->create([’thread_id’ => $thread->id]); });
## 2 Test Driving threads
First small feature: "a user should be able to read threads." Simple enough! We'll start with a basic test, and then scaffold the necessary views to make it pass.
## 3 A Thread Can Have Replies
Given we have a thread
And that thread includes replies
When we visit a thread page
Then we should see the replies.
an_authenticated_user_may_participate_in_forum_threads
Given we have an authenitcated user
And an existing thread
When the user adds a reply to the thread
Then their reply should be included on the page.