Commit 75e87fb
committed
Improvements to User.from_omniauth spec setup
Previously this spec was making use of a `User` model and the
`User#serializable_hash` method. However, I'm pretty sure that was just
a convenience and there is nothing actually tying the attributes
returned from OmniAuth to the `User` model attributes.
I've changed the setup so it uses an explicit `Hash` derived from
observing the attributes that OmniAuth actually provides. This seems
more realistic and I'm hoping it will make it easier to apply an
unrelated fix in a subsequent commit.
I've also changed the assertions to be more explicit and like those
in the specs for `User.from_userinfo` & `User.from_token`.1 parent dce64da commit 75e87fb
1 file changed
+21
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
155 | | - | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
156 | 164 | | |
157 | 165 | | |
158 | 166 | | |
159 | 167 | | |
160 | 168 | | |
161 | | - | |
| 169 | + | |
162 | 170 | | |
163 | 171 | | |
164 | 172 | | |
| |||
170 | 178 | | |
171 | 179 | | |
172 | 180 | | |
173 | | - | |
174 | | - | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
175 | 191 | | |
176 | 192 | | |
177 | 193 | | |
| |||
0 commit comments