Navigation Menu

Skip to content

Commit

Permalink
Add test for EngineState#local_route?
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 30, 2015
1 parent ecabd8a commit 1710f65
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/unit/test_engine_state.rb
Expand Up @@ -35,6 +35,20 @@ def setup
:internal_name => INTERNAL_NODE_NAME)
end

data(:public => PUBLIC_NODE_NAME,
:internal => INTERNAL_NODE_NAME,
:public_with_local => "#{PUBLIC_NODE_NAME}.\#1",
:internal_with_local => "#{INTERNAL_NODE_NAME}.\#1")
def test_local_route(route)
assert_true(@state.local_route?(route))
end

data(:foreign => "node30:2929/droonga",
:foreign_with_logal => "node30:2929/droonga.\#1")
def test_not_local_route(route)
assert_false(@state.local_route?(route))
end

data(:public => {
:route => PUBLIC_NODE_NAME,
:expected => INTERNAL_NODE_NAME,
Expand Down

0 comments on commit 1710f65

Please sign in to comment.