Skip to content

Instantly share code, notes, and snippets.

@BLauris
BLauris / test.json
Last active October 26, 2017 09:25
[[1,2,\"qwqw\"],[1,2,\"qwqw\",1,2,\"qwqw\",1,2,\"qwqw\",1,2,\"qwqw\"],[1,2,\"qwqw\",1,2,\"qwqw\",1,2,\"qwqw\"],[1,2,\"qwqw\"],[1,2,\"qwqw\",1,2,\"qwqw\",1,2,\"qwqw\",1,2,\"qwqw\"],[1,2,\"qwqw\",1,2,\"qwqw\",1,2,\"qwqw\"],\"some random string\",[1,2,\"qwqw\"],[1,2,\"qwqw\",1,2,\"qwqw\",1,2,\"qwqw\",1,2,\"qwqw\"],[1,2,\"qwqw\",1,2,\"qwqw\",1,2,\"qwqw\"],[[1,2,\"qwqw\"],[1,2,\"qwqw\",1,2,\"qwqw\",1,2,\"qwqw\",1,2,\"qwqw\"],[1,2,\"qwqw\",1,2,\"qwqw\",1,2,\"qwqw\"],[1,2,\"qwqw\"],[1,2,\"qwqw\",1,2,\"qwqw\",1,2,\"qwqw\",1,2,\"qwqw\"],[1,2,\"qwqw\",1,2,\"qwqw\",1,2,\"qwqw\"],[1,2,\"qwqw\"],[1,2,\"qwqw\",1,2,\"qwqw\",1,2,\"qwqw\",1,2,\"qwqw\"],[1,2,\"qwqw\",1,2,\"qwqw\",1,2,\"qwqw\"]],\"some random string\",[[[1,2,\"qwqw\"],[1,2,\"qwqw\",1,2,\"qwqw\",1,2,\"qwqw\",1,2,\"qwqw\"],[1,2,\"qwqw\",1,2,\"qwqw\",1,2,\"qwqw\"],[1,2,\"qwqw\"],[1,2,\"qwqw\",1,2,\"qwqw\",1,2,\"qwqw\",1,2,\"qwqw\"],[1,2,\"qwqw\",1,2,\"qwqw\",1,2,\"qwqw\"],[1,2,\"qwqw\"],[1,2,\"qwqw\",1,2,\"qwqw\",1,2,\"qwqw\",1,2,\"qwqw\"],[1,2,\"qwqw\",1,2,\"qwqw
200 - :ok
204 - :no_content
400 - :bad_request
403 - :forbidden
401 - :unauthorized
404 - :not_found
410 - :gone
422 - :unprocessable_entity
500 - :internal_server_error
2.2.1 :040 > %w{1 2 3 4 5 6 7 8 9 10 11 112 123 1432}.select { |num| num%2==0 }
=> []
2.2.1 :041 > [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 112, 123, 1432].select { |num| num%2==0 }
=> [2, 4, 6, 8, 10, 112, 1432]
2.2.1 :042 >
PaymillPayment id: 33, token: "7F954E3DC526AFA5E062F5D8CDDEB3B2.sbg-vm-fe02", account_id: 1, tree_spot_id: 1, success: true, properties: {"zip"=>"66117", "city"=>"Saarbrücken", "email"=>"info@bonofa.com", "street"=>"Zinzingerstr. 6", "country"=>"DEU", "last_name"=>"Main", "object_id"=>"6", "first_name"=>"Bonofa", "paying_for"=>"update_package"}, created_at: "2014-11-04 11:55:44", updated_at: "2014-11-04 11:56:11", code: 0, reason: "Request successfully processed in 'Merchant in Int...", short_id: "2371.8981.6994", unique_id: "8a82944a4975e36901497aa97612195c", account_info: {"bin"=>"411111", "brand"=>"VISA", "expiry"=>"{\"month\"=>\"11\", \"year\"=>\"2014\"}", "holder"=>"Samuel li jacksom", "last4Digits"=>"1111"}
# Logfile created on 2014-07-04 08:38:29 +0000 by logger.rb/44203
E, [2014-07-07T13:47:03.264434 #15708] ERROR -- : Your card was declined. Your request was in test mode, but used a non test card. For a list of valid test cards, visit: https://stripe.com/docs/testing.
E, [2014-07-07T14:30:23.493705 #28635] ERROR -- : Your card was declined. Your request was in test mode, but used a non test card. For a list of valid test cards, visit: https://stripe.com/docs/testing.
E, [2014-07-22T08:17:00.520529 #19100] ERROR -- : Your card was declined. Your request was in test mode, but used a non test card. For a list of valid test cards, visit: https://stripe.com/docs/testing.
2014-10-03 13:15:06 INFO #<DataObjects::Response:0x0000000d4c0e98>
def self.to_csv(options = {})
CSV.generate(options) do |csv|
csv << column_names
all.each do |product|
csv << product.attributes.values_at(*column_names)
end
end
end
context 'create invali user' do
it 'should_not be valid' do
FactoryGirl.build(:admin_user, first_name: nil).should_not be_valid
end
end
Failures:
1) SpillOverBonus spill over bonus test
Failure/Error: expect(root_account.tree_spot.tree_spot_commissions.where(:etype => TreeSpotCommission.etypes[:spill_over_bonus]).sum(:value)).to eq(3.99375*2)
expected: 7.9875
got: #<BigDecimal:fc4ff68,'0.399375E1',18(18)>
(compared using ==)
# ./spec/requests/spill_over_bonus_spec.rb:29:in `block (2 levels) in <top (required)>'
Failures:
1) FormObjects::FileForm saves document file to databse
Failure/Error: expect(file_form.save).to be_true
NoMethodError:
undefined method `file_name_en_will_change!' for #<Documents::File id: nil, created_at: nil, updated_at: nil>
# ./app/documents/form_objects/file_form.rb:36:in `save'
# ./spec/documents/form_objects/file_form_spec.rb:34:in `block (2 levels) in <top (required)>'
2) the signup process signs up
def self.create_new_part(service_type_group_id, object_codes, object_ids, order_id)
order = Order.find(order_id)
order.can_edit? # raise error if order is not editable
service_type_group = ServiceTypeGroup.find(service_type_group_id)
object_codes.uniq! if object_codes.is_a? Array
object_ids.uniq! if object_ids.is_a? Array
if service_type_group.id == 1 # 1=Nekustamais īpašums 3=Nekustamā īpašuma kopa