Last active
July 3, 2020 13:44
-
-
Save NilsonLima/23f06c7989cddf2c0a80cf00eb2685d5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "test_helper" | |
class Smartphone::Contract::ChangeTest < ActiveSupport::TestCase | |
setup do | |
@smartphone_contract = smartphone_contracts(:base_contract) | |
@params = { id: @smartphone_contract[:id], ... } | |
end | |
subject { Smartphone::Contract::Change } | |
context "suspended" do | |
should "fail" do | |
# | |
end | |
end | |
context "not suspended" do | |
context "has pending invoices" do | |
should "fail" do | |
# | |
end | |
end | |
context "hasn't pending invoices" do | |
context "previous attributes are invalid" do | |
should "fail" do | |
# | |
end | |
end | |
context "previous attributes are valid" do | |
context "new attributes are invalid" do | |
should "fail" do | |
# | |
end | |
end | |
context "new attributes are valid" do | |
context "not suspendable" do | |
should "fail" do | |
# | |
end | |
end | |
context "suspendable" do | |
context "certificate changing" do | |
should "fail if operation fails" do | |
# | |
end | |
context "happy path" do | |
should "return success if operation succeeds" do | |
# | |
end | |
end | |
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