Sha256: 5dbd6ce9ab45c2d6c94b68bedf64203ae2761770f20a9fbb01e4b222a9a99f8a

Contents?: true

Size: 661 Bytes

Versions: 18

Compression:

Stored size: 661 Bytes

Contents

require 'test_helper'

class DiscoApp::AppUninstalledJobTest < ActionController::TestCase
  include ActiveJob::TestHelper

  def setup
    @shop = disco_app_shops(:widget_store)

    perform_enqueued_jobs do
      DiscoApp::AppUninstalledJob.perform_later(@shop, {})
    end
  end

  def teardown
    @shop = nil
  end

  test 'app uninstalled job changes shop status' do
    assert_performed_jobs 1
    @shop.reload
    assert @shop.uninstalled?
  end

  test 'app uninstalled job can be extended using concerns' do
    assert_performed_jobs 1
    @shop.reload
    assert_equal 'Nowhere', @shop.data['country_name'] # Assert extended method called.
  end

end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
disco_app-0.9.4 test/jobs/disco_app/app_uninstalled_job_test.rb
disco_app-0.9.5 test/jobs/disco_app/app_uninstalled_job_test.rb
disco_app-0.9.6 test/jobs/disco_app/app_uninstalled_job_test.rb
disco_app-0.9.7 test/jobs/disco_app/app_uninstalled_job_test.rb
disco_app-0.9.8 test/jobs/disco_app/app_uninstalled_job_test.rb
disco_app-0.9.9 test/jobs/disco_app/app_uninstalled_job_test.rb
disco_app-0.9.10 test/jobs/disco_app/app_uninstalled_job_test.rb
disco_app-0.9.11 test/jobs/disco_app/app_uninstalled_job_test.rb
disco_app-0.10.0 test/jobs/disco_app/app_uninstalled_job_test.rb
disco_app-0.10.1 test/jobs/disco_app/app_uninstalled_job_test.rb
disco_app-0.10.2 test/jobs/disco_app/app_uninstalled_job_test.rb
disco_app-0.10.3 test/jobs/disco_app/app_uninstalled_job_test.rb
disco_app-0.10.4 test/jobs/disco_app/app_uninstalled_job_test.rb
disco_app-0.10.5 test/jobs/disco_app/app_uninstalled_job_test.rb
disco_app-0.11.0 test/jobs/disco_app/app_uninstalled_job_test.rb
disco_app-0.11.1 test/jobs/disco_app/app_uninstalled_job_test.rb
disco_app-0.12.0 test/jobs/disco_app/app_uninstalled_job_test.rb
disco_app-0.12.1 test/jobs/disco_app/app_uninstalled_job_test.rb