Sha256: 573544f5e78c2f85e8d6ad637424df1f6d4f7161f4a3733c5ad4a0fec6a8b987

Contents?: true

Size: 654 Bytes

Versions: 7

Compression:

Stored size: 654 Bytes

Contents

require 'minitest'
require 'diff_news'

class ServiceTest < Minitest::Test
  def test_create_providers
    providers = {
      'http://www.tagesanzeiger.ch/sport/tennis/aufschlag-smash-und-tschuess/story/10062709' => 'tagesanzeiger.ch',
      'https://www.nzz.ch/international/europa/abstimmung-im-eu-parlament-xxx-fuer-beitrittsverhandlungen-mit-der-tuerkei-ld.1304606' => 'nzz.ch',
      'http://www.20min.ch/digital/news/story/Wi-Fi-Luecke-gefaehrdet-Millionen-von-Handys-12672249' => '20min.ch',
    }

    providers.each do |url, provider|
      service = DiffNews::Service.create url
      assert_equal service.provider, provider
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
diff_news-0.9.7 test/service_test.rb
diff_news-0.9.6 test/service_test.rb
diff_news-0.9.5 test/service_test.rb
diff_news-0.9.4 test/service_test.rb
diff_news-0.9.3 test/service_test.rb
diff_news-0.9.2 test/service_test.rb
diff_news-0.9.1 test/service_test.rb