test/functional/renders_controller_test.rb in versioncake-2.4.0 vs test/functional/renders_controller_test.rb in versioncake-2.5.0

- old
+ new

@@ -60,6 +60,12 @@ test "render the default version version of the partial" do VersionCake::Configuration.any_instance.stubs(:default_version => 1) get :index, "api_version" => "abc" assert_equal "template v1", @response.body end + + test "derived_version can be called before the before_filter and it returns the request version" do + @controller.instance_variable_set("@_lookup_context", mock(:versions= => nil)) + @controller.request.stubs(:query_parameters => {:api_version => "2"}) + assert_equal 2, @controller.derived_version + end end