Sha256: b8ab2f3c2d034b74566ec0590860b83c72bcb3628c33cbffc8274253e6f5acbb

Contents?: true

Size: 535 Bytes

Versions: 6

Compression:

Stored size: 535 Bytes

Contents

# encoding: utf-8

require 'test_helper'

class InvoiceBarHelperTest < ActionView::TestCase
  include InvoiceBar::InvoiceBarHelper
  
  test "should define active state for controller" do
    params[:controller] = 'invoice_bar/invoices'
    
    assert_equal 'active', active_for_controller('invoices')
    assert_not_equal 'active', active_for_controller('receipts')
  end
  
  test "should format postcode" do    
    assert_equal '747 27', formatted_postcode('74727')
    assert_equal '747 35', formatted_postcode('74735')
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
invoice_bar-0.0.6 test/unit/invoice_bar/helpers/invoice_bar_helper_test.rb
invoice_bar-0.0.5 test/unit/invoice_bar/helpers/invoice_bar_helper_test.rb
invoice_bar-0.0.4 test/unit/invoice_bar/helpers/invoice_bar_helper_test.rb
invoice_bar-0.0.3 test/unit/invoice_bar/helpers/invoice_bar_helper_test.rb
invoice_bar-0.0.2 test/unit/invoice_bar/helpers/invoice_bar_helper_test.rb
invoice_bar-0.0.1 test/unit/invoice_bar/helpers/invoice_bar_helper_test.rb