facebook-stub 0.0.1.17 → 0.0.1.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/bin/facebook-stub.js CHANGED
@@ -411,7 +411,7 @@
411
411
 
412
412
  function ui(options, callback) {
413
413
  if (FBWorld.state('loggedIn')) {
414
- if (options.method === 'feed'){
414
+ if (options.method === 'feed' || options.method === 'stream.share'){
415
415
  FBWorld.beingPromptedToShare = true;
416
416
  FBWorld.beingPromptedToShareOptions = options;
417
417
  FBWorld.beingPromptedToShareCallback = callback;
@@ -411,7 +411,7 @@
411
411
 
412
412
  function ui(options, callback) {
413
413
  if (FBWorld.state('loggedIn')) {
414
- if (options.method === 'feed'){
414
+ if (options.method === 'feed' || options.method === 'stream.share'){
415
415
  FBWorld.beingPromptedToShare = true;
416
416
  FBWorld.beingPromptedToShareOptions = options;
417
417
  FBWorld.beingPromptedToShareCallback = callback;
@@ -1,3 +1,3 @@
1
1
  module FacebookStub
2
- VERSION = "0.0.1.17"
2
+ VERSION = "0.0.1.18"
3
3
  end
@@ -34,4 +34,31 @@ describe("FB.ui", function() {
34
34
  });
35
35
  });
36
36
 
37
+ describe("when calling with {method: 'stream.share'}", function() {
38
+ describe("when loggedIn", function() {
39
+
40
+ beforeEach(function() {
41
+ FBWorld.loggedIn();
42
+ });
43
+
44
+ it("should set me to beingPromptedToShare", function() {
45
+ FB.ui({method: 'stream.share'});
46
+ expect(FBWorld.beingPromptedToShare).toBeTruthy();
47
+ });
48
+ });
49
+
50
+ describe("when not loggedIn", function () {
51
+ it("should set me to beingPromptedToLogin", function() {
52
+ FB.ui({method: 'stream.share'});
53
+ expect(FBWorld.beingPromptedToLogin).toBeTruthy();
54
+ expect(FBWorld.beingPromptedToShare).toBeFalsy();
55
+
56
+ FBWorld.successfullyLogin(Math.floor(Math.random() * 100000));
57
+
58
+ expect(FBWorld.beingPromptedToShare).toBeTruthy();
59
+
60
+ });
61
+ });
62
+ });
63
+
37
64
  });
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: facebook-stub
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.17
4
+ version: 0.0.1.18
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-06-08 00:00:00.000000000 Z
12
+ date: 2012-06-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: debugger
@@ -205,7 +205,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
205
205
  version: '0'
206
206
  segments:
207
207
  - 0
208
- hash: 1547191697879294636
208
+ hash: -3213963571041860594
209
209
  required_rubygems_version: !ruby/object:Gem::Requirement
210
210
  none: false
211
211
  requirements:
@@ -214,7 +214,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
214
214
  version: '0'
215
215
  segments:
216
216
  - 0
217
- hash: 1547191697879294636
217
+ hash: -3213963571041860594
218
218
  requirements: []
219
219
  rubyforge_project: facebook-stub
220
220
  rubygems_version: 1.8.21