spec/integration/lib/auth0/api/v2/api_jobs_spec.rb in auth0-4.0.0 vs spec/integration/lib/auth0/api/v2/api_jobs_spec.rb in auth0-4.1.0

- old
+ new

@@ -15,33 +15,34 @@ 'plan' => 'premium' }, 'user_metadata' => { 'theme' => 'light' } - } - ] + }] end let(:users_file) do File.new('temp.json', 'w+') { |f| f.write(file_content) } end let(:connection_id) do client.connections - .find do |connection| - connection['name'].include?(Auth0::Api::AuthenticationEndpoints::UP_AUTH) - end['id'] + .find do |connection| + connection['name'].include?(Auth0::Api::AuthenticationEndpoints::UP_AUTH) + end['id'] end let(:imported_users) { client.import_users(users_file, connection_id) } it do expect(imported_users).to include( 'connection' => Auth0::Api::AuthenticationEndpoints::UP_AUTH, 'status' => 'pending', - 'type' => 'users_import') + 'type' => 'users_import' + ) end let(:import_job_id) { imported_users['id'] } it do expect(client.get_job(import_job_id)).to include( - 'connection' => Auth0::Api::AuthenticationEndpoints::UP_AUTH, 'type' => 'users_import', 'id' => import_job_id) + 'connection' => Auth0::Api::AuthenticationEndpoints::UP_AUTH, 'type' => 'users_import', 'id' => import_job_id + ) end end describe '.send_verification_email and .get_job' do let(:user) do @@ -49,15 +50,16 @@ 'password' => Faker::Internet.password, 'email_verified' => false, 'connection' => Auth0::Api::AuthenticationEndpoints::UP_AUTH, 'app_metadata' => {}) end - let(:email_verification_job) { client.send_verification_email(user_id: user['user_id']) } + let(:email_verification_job) { client.send_verification_email(user['user_id']) } it { expect(email_verification_job).to include('status' => 'pending', 'type' => 'verification_email') } let(:email_job_id) { email_verification_job['id'] } it do expect(client.get_job(email_job_id)).to include( - 'status' => 'completed', 'type' => 'verification_email', 'id' => email_job_id) + 'status' => 'completed', 'type' => 'verification_email', 'id' => email_job_id + ) end end after(:all) do new_client = Auth0Client.new(v2_creds)