Sha256: c9f79af9af8b0f4dbe5f47635d9191a2311a2cfb7874e49b977fd1df8018fca2
Contents?: true
Size: 890 Bytes
Versions: 5
Compression:
Stored size: 890 Bytes
Contents
require 'rails_helper' module RocketJobMissionControl RSpec.describe SlicesHelper, type: :helper do before do helper.extend(RocketJobMissionControl::ApplicationHelper) end describe '#display_slice_info' do let(:slice) { { id: 42, name: 'test' } } context "when encrypted" do it { expect(helper.display_slice_info(slice, true)).to eq('encrypted') } end context "when unencrypted" do before do allow(helper).to receive(:pretty_print_array_or_hash) end it "does not return 'encrypted'" do expect(helper.display_slice_info(slice, false)).to_not eq('encrypted') end it "displays the slice info" do helper.display_slice_info(slice, false) expect(helper).to have_received(:pretty_print_array_or_hash).with(slice.to_a) end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems