Sha256: 6e6c353ae6b8f3e443d693e1771123b2fc1f6e2b4f11978fea17ec519bbebe90
Contents?: true
Size: 723 Bytes
Versions: 3
Compression:
Stored size: 723 Bytes
Contents
require 'test_helper' class Seiten::HTML::NavigationTest < ActiveSupport::TestCase def context controller = ApplicationController.new controller.view_context.tap do |context| context.instance_eval do def url_options { host: 'localhost:3000' } end end end end def navigation @navigation ||= Seiten::Navigation.find_by(id: 'application.en') end def current_page @current_page ||= navigation.pages.find_by(slug: '') end test '::new' do nav = Seiten::HTML::Navigation.new(context, navigation: navigation, current_page: current_page) html = File.read(File.join(FIXTURES_DIR, 'navigation.html')).strip assert_equal html, nav.body end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
seiten-1.0.2 | test/lib/seiten/html/navigation_test.rb |
seiten-1.0.1 | test/lib/seiten/html/navigation_test.rb |
seiten-1.0.0 | test/lib/seiten/html/navigation_test.rb |