Commit 55ed4cb56e07bdfcb6bc23fcb953e3510aff57a6
1 parent
6548e2f2
Exists in
master
and in
23 other branches
ActionItem980: making it easier to find users
In the console, specially
Showing
2 changed files
with
8 additions
and
0 deletions
Show diff stats
app/models/user.rb
test/unit/user_test.rb
| ... | ... | @@ -283,6 +283,10 @@ class UserTest < Test::Unit::TestCase |
| 283 | 283 | assert !user.email_activation_pending? |
| 284 | 284 | end |
| 285 | 285 | |
| 286 | + should 'be able to use [] operator to find users by login' do | |
| 287 | + assert_equal users(:ze), User['ze'] | |
| 288 | + end | |
| 289 | + | |
| 286 | 290 | protected |
| 287 | 291 | def new_user(options = {}) |
| 288 | 292 | user = User.new({ :login => 'quire', :email => 'quire@example.com', :password => 'quire', :password_confirmation => 'quire' }.merge(options)) | ... | ... |