|
114 | 114 | describe "open registration" do |
115 | 115 | it "should show a pre-registered user the confirmation form" do |
116 | 116 | user_with_pseudonym(:password => :autogenerate) |
| 117 | + @user.accept_terms |
| 118 | + @user.save |
117 | 119 | @user.should be_pre_registered |
118 | 120 |
|
119 | 121 | get 'confirm', :nonce => @cc.confirmation_code |
|
126 | 128 |
|
127 | 129 | it "should finalize registration for a pre-registered user" do |
128 | 130 | user_with_pseudonym(:password => :autogenerate) |
| 131 | + @user.accept_terms |
| 132 | + @user.save |
129 | 133 | @user.should be_pre_registered |
130 | 134 |
|
131 | 135 | post 'confirm', :nonce => @cc.confirmation_code, :register => 1, :pseudonym => {:password => 'asdfasdf', :password_confirmation => 'asdfasdf'} |
|
152 | 156 | @account = Account.create! |
153 | 157 | @course = Course.create!(:account => @account) { |c| c.workflow_state = 'available' } |
154 | 158 | user_with_pseudonym(:account => @account, :password => :autogenerate) |
| 159 | + @user.accept_terms |
| 160 | + @user.save |
155 | 161 | @enrollment = @course.enroll_user(@user) |
156 | 162 | @pseudonym.account.should == @account |
157 | 163 | @user.should be_pre_registered |
|
190 | 196 | it "should show the confirm form for a creation_pending user" do |
191 | 197 | course(:active_all => 1) |
192 | 198 | user |
| 199 | + @user.accept_terms |
193 | 200 | @user.update_attribute(:workflow_state, 'creation_pending') |
194 | 201 | @cc = @user.communication_channels.create!(:path => 'jt@instructure.com') |
195 | 202 | @enrollment = @course.enroll_student(@user) |
|
205 | 212 | it "should register creation_pending user" do |
206 | 213 | course(:active_all => 1) |
207 | 214 | user |
| 215 | + @user.accept_terms |
208 | 216 | @user.update_attribute(:workflow_state, 'creation_pending') |
209 | 217 | @cc = @user.communication_channels.create!(:path => 'jt@instructure.com') |
210 | 218 | @enrollment = @course.enroll_student(@user) |
|
230 | 238 |
|
231 | 239 | it "should show the confirm form for a creation_pending user that's logged in (masquerading)" do |
232 | 240 | user |
| 241 | + @user.accept_terms |
233 | 242 | @user.update_attribute(:workflow_state, 'creation_pending') |
234 | 243 | @cc = @user.communication_channels.create!(:path => 'jt@instructure.com') |
235 | 244 | # not a full user session; just @current_user is set |
|
243 | 252 |
|
244 | 253 | it "should register creation_pending user that's logged in (masquerading)" do |
245 | 254 | user |
| 255 | + @user.accept_terms |
246 | 256 | @user.update_attribute(:workflow_state, 'creation_pending') |
247 | 257 | @cc = @user.communication_channels.create!(:path => 'jt@instructure.com') |
248 | 258 | # not a full user session; just @current_user is set |
|
267 | 277 | @account = Account.create! |
268 | 278 | course(:active_all => 1, :account => @account) |
269 | 279 | user |
| 280 | + @user.accept_terms |
270 | 281 | @user.update_attribute(:workflow_state, 'creation_pending') |
271 | 282 | @cc = @user.communication_channels.create!(:path => 'jt@instructure.com') |
272 | 283 | @enrollment = @course.enroll_student(@user) |
|
285 | 296 | @account = Account.create! |
286 | 297 | course(:active_all => 1, :account => @account) |
287 | 298 | user |
| 299 | + @user.accept_terms |
288 | 300 | @user.update_attribute(:workflow_state, 'creation_pending') |
289 | 301 | @cc = @user.communication_channels.create!(:path => 'jt@instructure.com') |
290 | 302 | @enrollment = @course.enroll_student(@user) |
|
311 | 323 | it "should prepare to register a creation_pending user in the correct account (admin)" do |
312 | 324 | @account = Account.create! |
313 | 325 | user |
| 326 | + @user.accept_terms |
314 | 327 | @user.update_attribute(:workflow_state, 'creation_pending') |
315 | 328 | @account.add_user(@user) |
316 | 329 | @cc = @user.communication_channels.create!(:path => 'jt@instructure.com') |
|
327 | 340 | it "should register creation_pending user in the correct account (admin)" do |
328 | 341 | @account = Account.create! |
329 | 342 | user |
| 343 | + @user.accept_terms |
330 | 344 | @user.update_attribute(:workflow_state, 'creation_pending') |
331 | 345 | @account.add_user(@user) |
332 | 346 | @cc = @user.communication_channels.create!(:path => 'jt@instructure.com') |
|
350 | 364 | it "should show the confirm form for old creation_pending users that have a pseudonym" do |
351 | 365 | course(:active_all => 1) |
352 | 366 | user |
| 367 | + @user.accept_terms |
353 | 368 | @user.update_attribute(:workflow_state, 'creation_pending') |
354 | 369 | @cc = @user.communication_channels.create!(:path => 'jt@instructure.com') |
355 | 370 | @enrollment = @course.enroll_student(@user) |
|
364 | 379 | it "should work for old creation_pending users that have a pseudonym" do |
365 | 380 | course(:active_all => 1) |
366 | 381 | user |
| 382 | + @user.accept_terms |
367 | 383 | @user.update_attribute(:workflow_state, 'creation_pending') |
368 | 384 | @cc = @user.communication_channels.create!(:path => 'jt@instructure.com') |
369 | 385 | @enrollment = @course.enroll_student(@user) |
|
391 | 407 | user_with_pseudonym(:active_all => 1, :username => 'jt@instructure.com') |
392 | 408 | course(:active_all => 1) |
393 | 409 | user |
| 410 | + @user.accept_terms |
394 | 411 | @user.update_attribute(:workflow_state, 'creation_pending') |
395 | 412 | @cc = @user.communication_channels.create!(:path => 'jt@instructure.com') |
396 | 413 | @enrollment = @course.enroll_student(@user) |
|
407 | 424 | user_with_pseudonym(:active_all => 1, :username => 'jt@instructure.com') |
408 | 425 | course(:active_all => 1) |
409 | 426 | user |
| 427 | + @user.accept_terms |
410 | 428 | @user.update_attribute(:workflow_state, 'creation_pending') |
411 | 429 | @cc = @user.communication_channels.create!(:path => 'jt@instructure.com') |
412 | 430 | @enrollment = @course.enroll_student(@user) |
|
562 | 580 |
|
563 | 581 | it "should accept an invitation when creating a new user" do |
564 | 582 | course_with_student(:active_course => 1) |
| 583 | + @user.accept_terms |
565 | 584 | @user.update_attribute(:workflow_state, 'creation_pending') |
566 | 585 | @cc = @user.communication_channels.create!(:path => 'jt@instructure.com') |
567 | 586 |
|
|
0 commit comments