From 73fdf443fdc614ba4c0b27988cae2304ffd4750c Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Thu, 22 Sep 2016 17:17:11 +0800 Subject: [PATCH] This should have been removed. --- .../basic_category_serializer_spec.rb | 40 ------------------- 1 file changed, 40 deletions(-) delete mode 100644 spec/serializers/basic_category_serializer_spec.rb diff --git a/spec/serializers/basic_category_serializer_spec.rb b/spec/serializers/basic_category_serializer_spec.rb deleted file mode 100644 index 65fb7f62fb4..00000000000 --- a/spec/serializers/basic_category_serializer_spec.rb +++ /dev/null @@ -1,40 +0,0 @@ -require "rails_helper" -require_dependency "category" - -describe BasicCategorySerializer do - - let(:cdn) { "https://my.awesome.cdn" } - let(:upload) { Fabricate(:upload) } - let(:json) { BasicCategorySerializer.new(category, scope: Guardian.new, root: false).as_json } - - describe "logo_url" do - - let(:category) { Fabricate(:category, logo_url: upload.url) } - - it "uses absolute schemaless URL" do - expect(json[:logo_url]).to eq("//test.localhost#{upload.url}") - end - - it "uses CDN when available" do - Discourse.stubs(:asset_host).returns(cdn) - expect(json[:logo_url]).to eq("#{cdn}#{upload.url}") - end - - end - - describe "background_url" do - - let(:category) { Fabricate(:category, background_url: upload.url) } - - it "uses absolute schemaless URL" do - expect(json[:background_url]).to eq("//test.localhost#{upload.url}") - end - - it "uses CDN when available" do - Discourse.stubs(:asset_host).returns(cdn) - expect(json[:background_url]).to eq("#{cdn}#{upload.url}") - end - - end - -end