Add user transient attribute to oauth_access_token factory

This commit is contained in:
Anton Khorev 2025-01-23 17:43:30 +03:00
parent 3f62d67684
commit ef648a53ba
6 changed files with 18 additions and 14 deletions

View file

@ -36,7 +36,7 @@ end
class ModeratorApiAbilityTest < ApiAbilityTest
test "Note permissions" do
token = create(:oauth_access_token, :scopes => %w[write_notes], :resource_owner_id => create(:moderator_user).id)
token = create(:oauth_access_token, :scopes => %w[write_notes], :user => create(:moderator_user))
ability = ApiAbility.new token
[:index, :create, :comment, :feed, :show, :search, :close, :reopen, :destroy].each do |action|