pag_seguro 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -5,3 +5,4 @@ pkg/*
5
5
  coverage/*
6
6
  doc/*
7
7
  spec/pag_seguro/integration/config_example.yml
8
+ .DS_Store
@@ -17,7 +17,7 @@
17
17
  - items.each do |item|
18
18
  %item
19
19
  %id= item.id
20
- %description= item.description
20
+ %description&= item.description
21
21
  %amount= item.amount
22
22
  %quantity= item.quantity
23
23
  - if item.shipping_cost.present?
@@ -1,3 +1,3 @@
1
1
  module PagSeguro
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
@@ -3,7 +3,7 @@ require 'spec_helper'
3
3
 
4
4
  items = [
5
5
  PagSeguro::Item.new(id: 25, description: "A Bic Pen", amount: "1.50", quantity: "4", shipping_cost: "1.00", weight: 10),
6
- PagSeguro::Item.new(id: 73, description: "A Book", amount: "38.23", quantity: "1", shipping_cost: "12.00", weight: 300),
6
+ PagSeguro::Item.new(id: 73, description: "A Book & Cover", amount: "38.23", quantity: "1", shipping_cost: "12.00", weight: 300),
7
7
  PagSeguro::Item.new(id: 95, description: "A Towel", amount: "69.35", quantity: "2", weight: 400),
8
8
  PagSeguro::Item.new(id: 17, description: "A pipe", amount: "3.00", quantity: "89")
9
9
  ]
@@ -44,8 +44,12 @@ describe PagSeguro::Payment do
44
44
  @xml.css("checkout items item id").map(&:content).should == ["25","73","95","17"]
45
45
  end
46
46
 
47
- it "should show all descriptions" do
48
- @xml.css("checkout items item description").map(&:content).should == ["A Bic Pen","A Book","A Towel","A pipe"]
47
+ it "should show all descriptions escaping html" do
48
+ @xml.css("checkout items item description").map(&:content).should == ["A Bic Pen","A Book & Cover","A Towel","A pipe"]
49
+ end
50
+
51
+ it "should escape html in item description" do
52
+ @payment.checkout_xml.should include("A Book & Cover")
49
53
  end
50
54
 
51
55
  it "should show all amounts" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pag_seguro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-02 00:00:00.000000000 Z
12
+ date: 2012-08-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activemodel
@@ -168,4 +168,3 @@ test_files:
168
168
  - spec/pag_seguro/version_spec.rb
169
169
  - spec/spec_helper.rb
170
170
  - spec/support/transaction_shared_examples.rb
171
- has_rdoc: false