Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Omit flavor from base_url * Add simple unit test for custom lookandfeel
- Loading branch information
Yasuhiro Asaka
committed
Jul 13, 2016
1 parent
4bbd258
commit 8f8f54d
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
$: << File.dirname(__FILE__) | ||
$: << File.expand_path('..', File.dirname(__FILE__)) | ||
$: << File.expand_path('../../../lib', File.dirname(__FILE__)) | ||
|
||
require 'minitest/autorun' | ||
require 'flexmock/minitest' | ||
require 'sbsm/session' | ||
require 'bbmb/html/util/lookandfeel' | ||
|
||
module BBMB | ||
module Html | ||
class TestApplication | ||
def unknown_user; end | ||
end | ||
|
||
module Util | ||
class TestLookandfeel < ::Minitest::Test | ||
def setup | ||
@app = TestApplication.new | ||
@session = SBSM::Session.new('test', @app) | ||
end | ||
|
||
def test_base_url_does_not_include_flavor | ||
lookandfeel = Lookandfeel.new(@session) | ||
assert_equal('sbsm', lookandfeel.flavor) | ||
refute_match(@session.flavor, lookandfeel.base_url) | ||
end | ||
end | ||
end | ||
end | ||
end |