test/test_stumble_upon.rb in ubiquitously-0.0.1.6 vs test/test_stumble_upon.rb in ubiquitously-0.1.0

- old
+ new

@@ -1,12 +1,12 @@ require File.dirname(__FILE__) + '/test_helper.rb' module Ubiquitously class StumbleUponTest < ActiveSupport::TestCase - context "StumbleUpon::User" do + context "StumbleUpon::Account" do setup do - @user = Ubiquitously::StumbleUpon::User.new + @user = Ubiquitously::StumbleUpon::Account.new end context "login" do should "raise informative error if invalid password" do @user.password = "bad password" @@ -23,10 +23,30 @@ end end context "StumbleUpon::Post" do setup do - @post = Ubiquitously::StumbleUpon::Post.new + @user = Ubiquitously::User.new( + :username => "viatropos", + :cookies_path => "test/cookies.yml" + ) + + @title = "jQuery" + @description = "The only javascript framework you'll need. Well, if you need Object Oriented JS, you'll have to do a little initial setup." + @tags = %w(javascript, frameworks, jquery) + + @post = Ubiquitously::Post.new( + :url => "./test/meta.html", + :title => @title, + :description => @description, + :tags => @tags, + :user => @user + ) + end + + should "create a post" do + @post.url = "http://jquery.com" + assert @post.save(:stumble_upon) end end end end