openstax_api 5.4.5 → 5.4.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -128,6 +128,16 @@ module OpenStax
128
128
  expect(items.count).to eq 0
129
129
  end
130
130
 
131
+ it "removes duplicate search results" do
132
+ outputs = Hashie::Mash.new(items: [@john_hash, @john_hash, @jane_hash])
133
+ response = JSON.parse(UserSearchRepresenter.new(outputs).to_json)
134
+ total_count = response['total_count']
135
+ items = response['items']
136
+
137
+ expect(total_count).to eq 2
138
+ expect(items.count).to eq 2
139
+ end
140
+
131
141
  end
132
142
  end
133
143
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openstax_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.4.5
4
+ version: 5.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dante Soares
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-06-12 00:00:00.000000000 Z
12
+ date: 2015-06-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails