Created
March 22, 2012 03:59
-
-
Save Sedward/2155727 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rspec' | |
require 'koala' | |
describe "new stuff" do | |
before do | |
@graph = Koala::Facebook::API.new("AAACNTDIeX5MBAEZCdoXPE7nsltT3tVuqiCassXFqRzU2uBb1hTdZBtT3kq2YNcsnJOlsZAqRpmi8wZDZD") | |
end | |
describe "hiding page posts" do | |
it "should hide a post" do | |
result = @graph.graph_call("2564906219681_257541771235", {:is_hidden => true}, "post", {}) | |
pp result | |
end | |
it "should un-hide a post" do | |
result = @graph.graph_call("256490109681_2575417671235", {:is_hidden => false}, "post", {}) | |
pp result | |
end | |
end | |
describe "milestones" do | |
it "gets the milestones" do | |
milestones = @graph.get_connection("256490629681", "milestones") | |
pp milestones | |
end | |
it "puts a new milestone" do | |
args = {:title => "Example Title", :description => "Description", :start_time => "1329417443"} | |
milestone = @graph.put_connections("256490609681", "milestones", args) | |
end | |
it "deletes a milestone" do | |
#@graph.delete_connections() | |
pending | |
end | |
end | |
describe "page" do | |
it "edits a page attributes" do | |
args = {:about => "About Text", | |
:description => "Description", | |
:general_info => "General", | |
:website => "http://example.com"} | |
@graph.graph_call("2564906109681", args, "post", {}) | |
end | |
describe "messages" do | |
it "gets page messages" do | |
# @graph.get_connection("256490621109681", "conversations") | |
pending | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment