Created
January 24, 2018 08:29
-
-
Save mariusz-blaszczak/d626adc72d7b5c236e5cc7b78e3dd941 to your computer and use it in GitHub Desktop.
Ruby code sample for rubymine support
This file contains 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
# not expected | |
it 'updates postal code of the customer' do | |
customer = build(:hiltes_kunde) | |
customer.anschrift.Plz = '1500' | |
customer.save | |
params = ActionController::Parameters.new( | |
postal_code: '1501', hiltes_mandant: 1, hiltes_firmengruppe: 1, hiltes_nr: customer.Nr | |
) | |
service = described_class.new | |
expect { service.call(params) } | |
.to change { customer.reload.Plz } | |
.from('1500') | |
.to('1501') | |
end | |
#expected formatting | |
it 'updates postal code of the customer' do | |
customer = build(:hiltes_kunde) | |
customer.anschrift.Plz = '1500' | |
customer.save | |
params = ActionController::Parameters.new( | |
postal_code: '1501', hiltes_mandant: 1, hiltes_firmengruppe: 1, hiltes_nr: customer.Nr | |
) | |
service = described_class.new | |
expect { service.call(params) } | |
.to change { customer.reload.Plz } | |
.from('1500') | |
.to('1501') | |
endng |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment