Skip to content

Instantly share code, notes, and snippets.

@NilsonLima
Created July 3, 2020 14:47
Show Gist options
  • Save NilsonLima/760bae65c8a912ca2bfc1f49e035f0d0 to your computer and use it in GitHub Desktop.
Save NilsonLima/760bae65c8a912ca2bfc1f49e035f0d0 to your computer and use it in GitHub Desktop.
require "test_helper"
class Smartphone::Contract::CancelTest < ActiveSupport::TestCase
setup do
@smartphone_contract = smartphone_contracts(:base_contract)
@params = { id: @smartphone_contract[:id], ... }
end
subject { Smartphone::Contract::Cancel }
context "uncancelable" do
should "fail" do
#
end
end
context "cancelable" do
context "not suspendable" do
should "fail" do
#
end
end
context "suspendable" do
context "can't cancel certficate" do
context "happy path" do
should "return success" do
#
end
end
end
context "can cancel certificate" do
context "locally uncancelable" do
should "fail" do
#
end
end
context "locally cancelable" do
context "happy path" do
should "return success" do
#
end
end
end
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment