Remove dead code

This commit is contained in:
gregoirenovel 2018-12-18 22:48:56 +01:00
parent 1a41a068ec
commit df7e0a9881
17 changed files with 2 additions and 317 deletions

View file

@ -17,18 +17,4 @@ describe ApplicationHelper do
it { is_expected.to be_nil }
end
end
describe "#ensure_safe_json" do
subject { ensure_safe_json(json) }
context "with a dirty json" do
let(:json) { "alert('haha');" }
it { is_expected.to eq({}) }
end
context 'with a correct json' do
let(:json) { '[[{"lat": 2.0, "lng": 102.0}, {"lat": 3.0, "lng": 103.0}, {"lat": 2.0, "lng": 102.0}], [{"lat": 2.0, "lng": 102.0}, {"lat": 3.0, "lng": 103.0}, {"lat": 2.0, "lng": 102.0}]]' }
it { is_expected.to eq("[[{\"lat\":2.0,\"lng\":102.0},{\"lat\":3.0,\"lng\":103.0},{\"lat\":2.0,\"lng\":102.0}],[{\"lat\":2.0,\"lng\":102.0},{\"lat\":3.0,\"lng\":103.0},{\"lat\":2.0,\"lng\":102.0}]]") }
end
end
end