ability = ApiAbility.new token
[:create, :destroy, :restore].each do |action|
ability = ApiAbility.new token
[:create, :destroy, :restore].each do |action|
- token = create(:oauth_access_token, :resource_owner_id => create(:moderator_user).id, :scopes => %w[write_api])
+ token = create(:oauth_access_token, :user => create(:moderator_user), :scopes => %w[write_api])
ability = ApiAbility.new token
[:create, :destroy, :restore].each do |action|
ability = ApiAbility.new token
[:create, :destroy, :restore].each do |action|
- token = create(:oauth_access_token, :resource_owner_id => create(:moderator_user).id, :scopes => %w[write_notes])
+ token = create(:oauth_access_token, :user => create(:moderator_user), :scopes => %w[write_notes])