Sha256: 39bd5e7997352120b9577bd3b8590cce0e1bc47233502e1d494b75ff2b4521fc
Contents?: true
Size: 705 Bytes
Versions: 9
Compression:
Stored size: 705 Bytes
Contents
# frozen_string_literal: true require 'test_helper' module Shipit class DestroyRepositoryJobTest < ActiveSupport::TestCase setup do @job = DestroyRepositoryJob.new @repository = Repository.first end test "perform destroys the repository" do assert_difference -> { Repository.count }, -1 do @job.perform(@repository) end end test "perform destroys the repository's stacks" do stack = Stack.first Shipit.github.api.expects(:remove_hook).times(stack.github_hooks.count) @repository.stacks << stack assert_difference -> { Stack.count }, -@repository.stacks.size do @job.perform(@repository) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems