Skip to content

Commit 3a2ef30

Browse files
committed
Remove old testS
1 parent 7a090f1 commit 3a2ef30

File tree

2 files changed

+0
-57
lines changed

2 files changed

+0
-57
lines changed

Gemfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,3 @@ source :gemcutter
33

44
gemspec
55

6-
group :test do
7-
gem 'test-unit', '1.2.3'
8-
end

spec/rails/controller_spec.rb

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -55,67 +55,13 @@ class FakeController < ActionController::Base
5555
controller.fb_cookie?.should be_false
5656
end
5757

58-
it "gets the hash from the cookie" do
59-
controller.stub!(:cookies).and_return("fbs_12345"=>"param1=val1&param2=val2")
60-
controller.fb_cookie_hash.should == {"param1"=>"val1", "param2"=>"val2"}
61-
end
62-
63-
it "creates a user from the cookie" do
64-
controller.current_facebook_user.should_not be_nil
65-
controller.current_facebook_user.should be_an_instance_of(Mogli::User)
66-
controller.current_facebook_user.id.should == "12451752"
67-
end
68-
69-
it "sets the client for the user" do
70-
controller.current_facebook_user.client.access_token.should == "114355055262088|57f0206b01ad48bf84ac86f1-12451752|63WyZjRQbzowpN8ibdIfrsg80OA."
71-
end
7258

7359
it "doesn't create a user if there is no app cookie" do
7460
Facebooker2.app_id="other_app"
7561
controller.current_facebook_user.should be_nil
7662
end
7763

78-
it "creates a client from the cookie" do
79-
controller.current_facebook_client.should_not be_nil
80-
controller.current_facebook_client.should be_an_instance_of(Mogli::Client)
81-
controller.current_facebook_client.access_token.should == "114355055262088|57f0206b01ad48bf84ac86f1-12451752|63WyZjRQbzowpN8ibdIfrsg80OA."
82-
end
8364

84-
it "creates a client from params" do
85-
controller.stub!(:fb_cookie_hash).and_return({})
86-
controller.stub!(:cookies).and_return({})
87-
controller.stub!(:facebook_params).and_return(
88-
:oauth_token => "103188716396725|2.N0kBq5D0cbwjTGm9J4xRgA__.3600.1279814400-585612657|Txwy8S7sWBIJnyAXebEgSx6ntgY.",
89-
:expires=>"1279814400",
90-
:user_id => "585612657")
91-
controller.current_facebook_client.access_token.should == "103188716396725|2.N0kBq5D0cbwjTGm9J4xRgA__.3600.1279814400-585612657|Txwy8S7sWBIJnyAXebEgSx6ntgY."
92-
controller.current_facebook_user.id.should == "585612657"
93-
end
94-
95-
it "verifies that the signature is correct" do
96-
controller.fb_cookie_signature_correct?({
97-
"access_token" => "114355055262088|57f0206b01ad48bf84ac86f1-12451752|63WyZjRQbzowpN8ibdIfrsg80OA.",
98-
"expires" => "0",
99-
"secret" => "1e3375dcc4527e7ead0f82c095421690",
100-
"session_key" => "57f0206b01ad48bf84ac86f1-12451752",
101-
"uid" => "12451752",
102-
"sig" => "4337fcdee4cc68bb70ec495c0eebf89c"},
103-
"42ca6de519d53f6e0420247a4d108d90"
104-
).should be_true
105-
end
106-
107-
it "returns false if the signature is not correct" do
108-
controller.fb_cookie_signature_correct?({
109-
"access_token" => "114355055262088|57f0206b01ad48bf84ac86f1-12451752|63WyZjRQbzowpN8ibdIfrsg80OA.",
110-
"expires" => "0",
111-
"secret" => "1e3375dcc4527e7ead0f82c095421690",
112-
"session_key" => "57f0206b01ad48bf84ac86f1-12451752",
113-
"uid" => "5436785463785",
114-
"sig" => "4337fcdee4cc68bb70ec495c0eebf89c"},
115-
"42ca6de519d53f6e0420247a4d108d90"
116-
).should be_false
117-
118-
end
11965

12066
it "does not set a cookie if it is not required" do
12167
controller.stub!(:cookies).and_return("")

0 commit comments

Comments
 (0)