meducation_sdk 1.6.13 → 1.6.14

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2f7fb665bfedaae63e59774129ecf038d3c16c46
4
- data.tar.gz: 9819914d0fb2f11049ee0a0e4e9f8ed9625cd829
3
+ metadata.gz: 2aacdae0cd83a2793b14319ddd2fc4b7241a37f7
4
+ data.tar.gz: 47de75a36bdb6d31e388051743ac5d74d99bfe2c
5
5
  SHA512:
6
- metadata.gz: 919b8438d5df92d38b98f359f02d62e384c1bbc913f85464447b2241d7467b3623b3fe82fee175aaaeffc861d47f8931db5d24d0caebcdb74a8e3914f488efd2
7
- data.tar.gz: b48c1d8169c0e99edc742bb1f3d0477ff80d12b759af2654960ed6f42222558e5f4378d86ad6d5cd459ac23281af2077d3043ad71eaafe3a1b233558e9f2c1b4
6
+ metadata.gz: aafdfe29c85d330c67c24a78d8db87aa73b8ac37f30568d4cc656114b62de756f5d0f9ec490d3b57919e88e0f95dcadaca3078f532751261b26a16f230e02ced
7
+ data.tar.gz: a860a7a15a0f8af1e407b64c5b5d14a6ced4612c1f98c6e735750da08b7137dd00596f9a545a5953e4035c55568fda0f7eba8b9bf1bf38a5fd7df14040805632
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # 1.6.14 / 2014-03-24
2
+ * [BUGFIX] Fixes users for collection topic
3
+
1
4
  # 1.6.13 / 2014-03-19
2
5
  * [BUGFIX] Fixes for user recommendations
3
6
 
@@ -9,7 +9,7 @@ module MeducationSDK
9
9
  end
10
10
 
11
11
  def users
12
- @authors ||= User.where(id: authors.map(&:user_id))
12
+ @users ||= User.where(id: authors.map(&:user_id))
13
13
  end
14
14
 
15
15
  def comments
@@ -1,3 +1,3 @@
1
1
  module MeducationSDK
2
- VERSION = "1.6.13"
2
+ VERSION = "1.6.14"
3
3
  end
@@ -11,19 +11,30 @@ module MeducationSDK
11
11
  topic.comments
12
12
  end
13
13
  def test_authors_calls_spi
14
+ authors = [
15
+ Author.new(user_id: 8),
16
+ Author.new(user_id: 10)
17
+ ]
14
18
  topic = CollectionTopic.new(author_ids: [7, 8, 9])
15
- MeducationSDK::Author.expects(:where).with(id: [7, 8, 9])
16
- topic.authors
19
+ MeducationSDK::Author.expects(:where).with(id: [7, 8, 9]).returns(authors)
20
+ assert_equal authors, topic.authors
21
+ assert_equal authors, topic.instance_variable_get(:@authors)
17
22
  end
23
+
18
24
  def test_users_calls_spi
19
25
  authors = [
20
26
  Author.new(user_id: 8),
21
27
  Author.new(user_id: 10)
22
28
  ]
29
+ users = [
30
+ User.new(id: 8),
31
+ User.new(id: 10),
32
+ ]
23
33
  topic = CollectionTopic.new(author_ids: [7, 8, 9])
24
34
  MeducationSDK::Author.expects(:where).with(id: [7, 8, 9]).returns(authors)
25
- MeducationSDK::User.expects(:where).with(id: [8, 10])
26
- topic.users
35
+ MeducationSDK::User.expects(:where).with(id: [8, 10]).returns(users)
36
+ assert_equal users, topic.users
37
+ assert_equal users, topic.instance_variable_get(:@users)
27
38
  end
28
39
  end
29
40
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meducation_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.13
4
+ version: 1.6.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Walker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-19 00:00:00.000000000 Z
11
+ date: 2014-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport