░▒▓████████████████████████████████▓▒░ ░▒▓█ ▓▒░ ░▒▓█ ~ S W A M P ~ ▓▒░ ░▒▓█ ▓▒░ ░▒▓████████████████████████████████▓▒░
pplmvsvm
LOCATION:
/var/www/canvas/spec/lib/api/html
☗ ROOT
↻ REFRESH
✎ CARVE FLESH
EDITING: track_tag_spec.rb
# frozen_string_literal: true # # Copyright (C) 2016 - present Instructure, Inc. # # This file is part of Canvas. # # Canvas is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free # Software Foundation, version 3 of the License. # # Canvas is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Affero General Public License for more # details. # # You should have received a copy of the GNU Affero General Public License along # with this program. If not, see <http://www.gnu.org/licenses/>. # module Api module Html describe TrackTag do describe "#to_node" do subject(:node) do track_tag.to_node(url_helper) end let(:url_helper) do double({ show_media_tracks_url: "media/track/vtt" }) end let(:media_track) do double( kind: "subtitles", locale: "en", id: 1, media_object_id: 1 ) end let(:track_tag) do TrackTag.new( media_track, Nokogiri::XML::DocumentFragment.parse("<div></div>"), Nokogiri::XML::Node ) end specify { expect(node["kind"]).to eq "subtitles" } specify { expect(node["srclang"]).to eq "en" } specify { expect(node["src"]).not_to be_nil } specify { expect(node["label"]).to match(/English/) } end end end end
CANCEL
Name
Type
Size
Modified
Actions
↩ ..
DIR
—
—
📄 content_spec.rb
RB
8.9 KB
2023-09-24 03:39
EDIT
📄 link_spec.rb
RB
4 KB
2023-09-24 03:36
EDIT
📄 media_tag_spec.rb
RB
8.6 KB
2023-09-24 03:36
EDIT
📄 track_tag_spec.rb
RB
1.6 KB
2023-09-24 03:36
EDIT
📄 url_proxy_spec.rb
RB
6.8 KB
2023-09-24 03:36
EDIT