Sha256: 7ea62002459e0a7dfed3d67fa40412f6ed68a17850429915a1e45706588b059d

Contents?: true

Size: 630 Bytes

Versions: 9

Compression:

Stored size: 630 Bytes

Contents

# frozen_string_literal: true

require_relative 'helper'

class YoutubeTest < Test::Unit::TestCase
  include DeterministicHelper

  assert_methods_are_deterministic(
    FFakerTW::Youtube,
    :url, :share_url, :embed_url, :video_id
  )

  def test_url
    assert_match(%r(www\.youtube\.com/watch\?v=\S{11}), FFakerTW::Youtube.url)
  end

  def test_share_url
    assert_match(%r(youtu\.be/\S{11}), FFakerTW::Youtube.share_url)
  end

  def test_embed_url
    assert_match(%r(www\.youtube\.com/embed/\S{11}), FFakerTW::Youtube.embed_url)
  end

  def test_video_id
    assert_match(/\S{11}/, FFakerTW::Youtube.video_id)
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ffakerTW-1.8.0 test/test_youtube.rb
ffakerTW-1.7.0 test/test_youtube.rb
ffakerTW-1.6.0 test/test_youtube.rb
ffakerTW-1.5.0 test/test_youtube.rb
ffakerTW-1.4.0 test/test_youtube.rb
ffakerTW-1.3.0 test/test_youtube.rb
ffakerTW-1.2.0 test/test_youtube.rb
ffakerTW-1.1.0 test/test_youtube.rb
ffakerTW-0.1.0 test/test_youtube.rb