diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-19 17:16:28 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-19 17:16:28 +0300 |
commit | e4384360a16dd9a19d4d2d25d0ef1f2b862ed2a6 (patch) | |
tree | 2fcdfa7dcdb9db8f5208b2562f4b4e803d671243 /spec/lib/gitlab/webpack/file_loader_spec.rb | |
parent | ffda4e7bcac36987f936b4ba515995a6698698f0 (diff) |
Add latest changes from gitlab-org/gitlab@16-2-stable-eev16.2.0-rc42
Diffstat (limited to 'spec/lib/gitlab/webpack/file_loader_spec.rb')
-rw-r--r-- | spec/lib/gitlab/webpack/file_loader_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/lib/gitlab/webpack/file_loader_spec.rb b/spec/lib/gitlab/webpack/file_loader_spec.rb index c2e9cd8124d..16bf380fd13 100644 --- a/spec/lib/gitlab/webpack/file_loader_spec.rb +++ b/spec/lib/gitlab/webpack/file_loader_spec.rb @@ -32,15 +32,15 @@ RSpec.describe Gitlab::Webpack::FileLoader do end it "returns content when responds successfully" do - expect(Gitlab::Webpack::FileLoader.load(file_path)).to eq(file_contents) + expect(described_class.load(file_path)).to eq(file_contents) end it "raises error when 404" do - expect { Gitlab::Webpack::FileLoader.load("not_found") }.to raise_error("HTTP error 404") + expect { described_class.load("not_found") }.to raise_error("HTTP error 404") end it "raises error when errors out" do - expect { Gitlab::Webpack::FileLoader.load(error_file_path) }.to raise_error(Gitlab::Webpack::FileLoader::DevServerLoadError) + expect { described_class.load(error_file_path) }.to raise_error(Gitlab::Webpack::FileLoader::DevServerLoadError) end end @@ -53,7 +53,7 @@ RSpec.describe Gitlab::Webpack::FileLoader do end it "raises error if catches SSLError" do - expect { Gitlab::Webpack::FileLoader.load(error_file_path) }.to raise_error(Gitlab::Webpack::FileLoader::DevServerSSLError) + expect { described_class.load(error_file_path) }.to raise_error(Gitlab::Webpack::FileLoader::DevServerSSLError) end end @@ -66,11 +66,11 @@ RSpec.describe Gitlab::Webpack::FileLoader do describe ".load" do it "returns file content from file path" do - expect(Gitlab::Webpack::FileLoader.load(file_path)).to be(file_contents) + expect(described_class.load(file_path)).to be(file_contents) end it "throws error if file cannot be read" do - expect { Gitlab::Webpack::FileLoader.load(error_file_path) }.to raise_error(Gitlab::Webpack::FileLoader::StaticLoadError) + expect { described_class.load(error_file_path) }.to raise_error(Gitlab::Webpack::FileLoader::StaticLoadError) end end end |