Skip to content

Instantly share code, notes, and snippets.

@muhqu
Created August 1, 2013 09:44
Show Gist options
  • Save muhqu/6129959 to your computer and use it in GitHub Desktop.
Save muhqu/6129959 to your computer and use it in GitHub Desktop.
Scenario: Repost a 3D Post
Given there is user A
And there is user B following user A
And there is user C following user B
And there is user D following user A and B
And user A posted a photo P1
And user A posted a 3D photo P2
When user B reposted P2 as P3
Then the feeds should be like:
| feed | of | count | contains | because |
| userfeed | A | 2 | P1,P2 | A posted P1 and P2 |
| userfeed | B | 1 | P3 | B posted P3 |
| userfeed | C | 0 | | C did not post anything |
| userfeed | D | 0 | | D did not post anything |
| newsfeed | A | 2 | P1,P2 | A posted P1 and P2 and doesn't follow anyone |
| newsfeed | B | 3 | P1,P2,P3 | B posted P3 and follows A |
| newsfeed | C | 1 | P3 | C is following B and should see his repost |
| newsfeed | D | 2 | P1,P2 | D is following A and B, so he should see A's original |
| userfeed w/o reposts | A | 2 | P1,P2 | A posted P1 and P2 |
| userfeed w/o reposts | B | 0 | | A posted P1 and P2 |
| web userfeed | A | 1 | P1 | A posted P1 and P2 |
| web userfeed | B | 0 | | B posted P3 |
| web userfeed | C | 0 | | C did not post anything |
| web userfeed | D | 0 | | D did not post anything |
| web newsfeed | A | 1 | P1 | A posted P1 and P2 and doesn't follow anyone |
| web newsfeed | B | 1 | P1 | B posted P3 and follows A |
| web newsfeed | C | 0 | | C is following B and should see his repost |
| web newsfeed | D | 1 | P1 | D is following A and B, so he should see A's original |
| web userfeed w/o reposts | A | 1 | P1 | A posted P1 and P2 |
| web userfeed w/o reposts | B | 0 | | A posted P1 and P2 |
| 3D userfeed | A | 1 | P2 | A posted P2 which is a 3D photo |
| 3D userfeed | B | 1 | P3 | B posted P3 which is a repost of a 3D photo |
| 3D newsfeed | A | 1 | P2 | A posted P2 which is a 3D photo |
| 3D newsfeed | B | 2 | P2,P3 | B posted P3 which is a repost of a 3D photo, and follows A |
| 3D newsfeed | C | 1 | P3 | C is following B and should see his repost |
| 3D newsfeed | D | 1 | P2 | D is following A and B, so he should see A's original |
| 3D userfeed w/o reposts | A | 1 | P2 | A posted P2 which is a 3D photo |
| 3D userfeed w/o reposts | B | 0 | | B has not posted any 3D photo himself |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment