spec/requests/user_invitation_spec.rb in iugusdk-1.0.0.alpha.0 vs spec/requests/user_invitation_spec.rb in iugusdk-1.0.0.alpha.1
- old
+ new
@@ -7,10 +7,12 @@
@inviter = Fabricate(:user) do
name "fulano"
end
@account = Fabricate(:account)
@user_invitation = Fabricate(:user_invitation)
- @user_invitation.update_attributes(:invited_by => @inviter.id, :account_id => @account.id)
+ @user_invitation.account = @account
+ @user_invitation.invited_by = @inviter.id
+ @user_invitation.save
visit edit_invite_path(@user_invitation.id.to_s + @user_invitation.token)
end
it { page.should have_content @inviter.name }
it { page.should have_content @account.id }