Commit d5c9ea8
Fully test getPageIdFromPersistentId
Follow up to #64
@alistair3149 Writing good tests after the fact is more difficult
than if you follow the red-green-refactor cycle. You never had the
red step for this test, because I could remove the WHERE clause
from the query, and it would still pass. To know a test actually
does what you want, you need to see it fail first. It's easy to
miss testing parts of the production code or to fail to test it
altogether due to a mistake in the test.1 parent eb06ee0 commit d5c9ea8
File tree
1 file changed
+16
-7
lines changed- tests/Adapters
1 file changed
+16
-7
lines changedLines changed: 16 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
106 | | - | |
107 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
108 | 111 | | |
109 | | - | |
110 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
111 | 116 | | |
112 | 117 | | |
113 | | - | |
114 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
115 | 124 | | |
116 | 125 | | |
117 | 126 | | |
0 commit comments