Performance improvements, text search in Blog
[smr.git] / gui / test / unit / fetch_frankfurt_test.rb
blob6c57605441449b0f6bd3cc32d4aca3303dee0355
2 # This file is part of SMR.
4 # SMR is free software: you can redistribute it and/or modify it under the
5 # terms of the GNU General Public License as published by the Free Software
6 # Foundation, either version 3 of the License, or (at your option) any later
7 # version.
9 # SMR is distributed in the hope that it will be useful, but WITHOUT ANY
10 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 # A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License along with
14 # SMR.  If not, see <http://www.gnu.org/licenses/>.
16 require 'test_helper'
18 class FetchTest < ActiveSupport::TestCase
20     test "frankfurt reaper" do
21         return true unless smr_online_test?
23         to_test = [
24             Security.new(:symbol=>'US084670BK32', :description=>'Berkshire 2043'),
25         ]
27         to_test.each do |s|
28             reaper = Smr::Reapers::Frankfurt.new s
29             q = reaper.quote
30             assert q.is_a?(Quote), 'no Quote found for %s' % s.symbol
31             assert q.quote.is_a? Float
32             assert_not_equal 0, q.quote, 'a Quote should never be 0'
33             assert q.exchange
34         end
35     end
37 end