Sha256: dc116f7fbb4aff5cc7f3ae142165a391df521985786dc2cb4832aacf5ac14c79

Contents?: true

Size: 555 Bytes

Versions: 2

Compression:

Stored size: 555 Bytes

Contents

# -*- encoding : utf-8 -*-
# frozen_string_literal: true

require 'spec_helper'

describe LinkThumbnailer::Model do

  let(:instance) { described_class.new }

  describe '#sanitize' do

    let(:str)     { "foo\r\n" }
    let(:result)  { "foo" }
    let(:action)  { instance.send(:sanitize, str) }

    it { expect(action).to eq(result) }

    context "when string includes utf-8 characters" do
      let(:str) { "中文" }

      it "should keeps those characters" do
        expect(instance.send(:sanitize, str)).to eq(str)
      end
    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
link_thumbnailer-3.4.0 spec/model_spec.rb
link_thumbnailer-3.3.2 spec/model_spec.rb