Browse files

+ Unit test for merging EndPoint and request params

  • Loading branch information...
1 parent 329f3dc commit 7365255a8c614d10fb0ab99506be4d17725e6736 @Dirklectisch Dirklectisch committed Apr 15, 2011
Showing with 23 additions and 0 deletions.
  1. +23 −0 test/merge_test.rb
View
23 test/merge_test.rb
@@ -0,0 +1,23 @@
+
+require File.dirname(__FILE__) + '/base.rb'
+
+
+class MergeTest < Test::Unit::TestCase
+
+ include Rufus::Verbs
+
+
+ def test_0
+
+ ep = EndPoint.new(
+ :dry_run => true,
+ :uri => 'http://host/path',
+ :params => { 'token' => 'apiaccess'})
+
+ req = ep.get(
+ :params => { 'extra' => 'param'})
+
+ assert_equal "/path?token=apiaccess&extra=param", req.path
+
+ end
+end

0 comments on commit 7365255

Please sign in to comment.