Sha256: 56ffffb5422ea39c6a18e5a6d4711191a48f988d69caac281c003487014e98f1
Contents?: true
Size: 1.39 KB
Versions: 19
Compression:
Stored size: 1.39 KB
Contents
require 'test_helper' require 'rr' class RailsUtilTest < ActiveSupport::TestCase include RR::Adapters::TestUnit def setup_mock url mock(RestGraph::RailsUtil).rest_graph_in_canvas?{ false } mock(RestGraph::RailsUtil).request{ mock(Object.new).url{ url } } end def test_rest_graph_normalized_request_uri_0 setup_mock( 'http://test.com/?code=123&lang=en') assert_equal('http://test.com/?lang=en', RestGraph::RailsUtil.rest_graph_normalized_request_uri) end def test_rest_graph_normalized_request_uri_1 setup_mock( 'http://test.com/?lang=en&code=123') assert_equal('http://test.com/?lang=en', RestGraph::RailsUtil.rest_graph_normalized_request_uri) end def test_rest_graph_normalized_request_uri_2 setup_mock( 'http://test.com/?session=abc&lang=en&code=123') assert_equal('http://test.com/?lang=en', RestGraph::RailsUtil.rest_graph_normalized_request_uri) end def test_rest_graph_normalized_request_uri_3 setup_mock( 'http://test.com/?code=123') assert_equal('http://test.com/', RestGraph::RailsUtil.rest_graph_normalized_request_uri) end def test_rest_graph_normalized_request_uri_4 setup_mock( 'http://test.com/?signed_request=abc&code=123') assert_equal('http://test.com/', RestGraph::RailsUtil.rest_graph_normalized_request_uri) end end
Version data entries
19 entries across 12 versions & 1 rubygems