- test "as a moderator with write_api token" do
- token = create(:oauth_access_token, :user => create(:moderator_user), :scopes => %w[write_api])
- ability = ApiAbility.new token
+ test "as a moderator with write_changeset_comments scope" do
+ user = create(:moderator_user)
+ scopes = Set.new %w[write_changeset_comments]
+ ability = ApiAbility.new user, scopes