Skip to content

Instantly share code, notes, and snippets.

@julesfern
Created May 27, 2009 18:42
Show Gist options
  • Select an option

  • Save julesfern/118813 to your computer and use it in GitHub Desktop.

Select an option

Save julesfern/118813 to your computer and use it in GitHub Desktop.
describe "request factory" do
before(:all) do
@seed = fixtures.seed
@fixtures = fixtures["read-user"]
@proxy = Videojuicer::OAuth::RequestProxy.new(:consumer_key=>@fixtures.consumer.consumer_key, :consumer_secret=>@fixtures.consumer.consumer_secret, :token=>nil, :token_secret=>nil)
end
it "can successfully retrieve a request token (indicating a successful signature verification)" do
@proxy.consumer_key.should == @fixtures.consumer.consumer_key
response = @proxy.get("/oauth/tokens", :seed_name=>@seed.name)
response.body.should =~ /oauth_token=[a-zA-Z0-9]+&oauth_token_secret=[a-zA-Z0-9]+/
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment