diff options
author | Rajendra kadam <rajendrakadam249@gmail.com> | 2019-07-17 06:41:26 +0000 |
---|---|---|
committer | Clement Ho <408677-ClemMakesApps@users.noreply.gitlab.com> | 2019-07-17 06:41:26 +0000 |
commit | f8afb3805cf8cd12085c0e93bc6dad111afbd9c2 (patch) | |
tree | 53284acc02a0a98976d5e483344e24eef44e934c /spec/lib | |
parent | c1d370c904b0f6a0b6ebb27ebc3a5df7b693c4bb (diff) | |
download | gitlab-ce-f8afb3805cf8cd12085c0e93bc6dad111afbd9c2.tar.gz |
Fetch latest link in the description for zoom link, add more tests and remove frontend spec unnecessary tests
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/gitlab/zoom_link_extractor_spec.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/lib/gitlab/zoom_link_extractor_spec.rb b/spec/lib/gitlab/zoom_link_extractor_spec.rb new file mode 100644 index 00000000000..52387fc3688 --- /dev/null +++ b/spec/lib/gitlab/zoom_link_extractor_spec.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe Gitlab::ZoomLinkExtractor do + describe "#links" do + using RSpec::Parameterized::TableSyntax + + where(:text, :links) do + 'issue text https://zoom.us/j/123 and https://zoom.us/s/1123433' | %w[https://zoom.us/j/123 https://zoom.us/s/1123433] + 'https://zoom.us/j/1123433 issue text' | %w[https://zoom.us/j/1123433] + 'issue https://zoom.us/my/1123433 text' | %w[https://zoom.us/my/1123433] + 'issue https://gitlab.com and https://gitlab.zoom.us/s/1123433' | %w[https://gitlab.zoom.us/s/1123433] + 'https://gitlab.zoom.us/j/1123433' | %w[https://gitlab.zoom.us/j/1123433] + 'https://gitlab.zoom.us/my/1123433' | %w[https://gitlab.zoom.us/my/1123433] + end + + with_them do + subject { described_class.new(text).links } + + it { is_expected.to eq(links) } + end + end +end |