Fix for test/unit/dmptemplate_test.rb test_not_setting_margin_should_not_be_valid. This fails with error
Fix for test/unit/dmptemplate_test.rb test_not_setting_margin_should_not_be_valid. This fails with error

    test_setting_non-integer_as_font_size_should_not_be_valid(DmptemplateTest):
    NoMethodError: undefined method `to_i' for :foo:Symbol
        app/models/settings/dmptemplate.rb:73:in `block in <class:Dmptemplate>'

The problem arises from this line:

      self.formatting[:font_size] = self.formatting[:font_size].to_i if self.formatting[:font_size].present?

which tries to invoke to_i on :foo, the value passed from the test:

  test "setting non-integer as font_size should not be valid" do
    @font_size = :foo

The problem can be replicated via the Ruby command line e.g.

    2.0.0-p247 :009 >   "123".to_i
     => 123
    2.0.0-p247 :010 > "aaa".to_i
     => 0
    2.0.0-p247 :011 > :foo.to_i
    NoMethodError: undefined method `to_i' for :foo:Symbol
            from (irb):11
            from /disk/ssi-dev0/home/mjj/.rvm/rubies/ruby-2.0.0-p247/bin/irb:12:in `<main>'

Changing the test to set:

    @font_size = "foo"

ensures the test passes.

BibNumUMontreal/DMPonline_v4,cau-vfu/DMPonline_v4,BibNumUMontreal/DMPonline_v4,DigitalCurationCentre/DMPonline_v4,cau-vfu/DMPonline_v4,BibNumUMontreal/DMPonline_v4,DigitalCurationCentre/DMPonline_v4,DigitalCurationCentre/DMPonline_v4,cau-vfu/DMPonline_v4