Guest User

Untitled

a guest
Jan 21st, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. Given /^I am have an administrator$/ do
  2. User.create!(:login => 'administrator', :locale => 'en', :password => 'password', :email => 'admin@gmail.com')
  3. user = User.find_by_login('administrator')
  4. user.should_not be nil
  5. user.roles.count.should == 1
  6. user.roles.first.name.should == 'Administrator'
  7. user.roles.first.permissions.count.should_not == 0
  8. end
Add Comment
Please, Sign In to add comment