Sha256: 60deab87cdef91f83a031faea0627ab2fc18a7fbc06230d86dc1b7717353e80b

Contents?: true

Size: 839 Bytes

Versions: 13

Compression:

Stored size: 839 Bytes

Contents

require_relative "../../test_helper"

module RocketJobMissionControl
  SlicesHelper.include(RocketJobMissionControl::ApplicationHelper)
  class SlicesHelperTest < ActionView::TestCase
    describe SlicesHelper do
      describe "#display_slice_info" do
        let(:slice) { {id: 42, name: "test"} }

        describe "when encrypted" do
          it "only shows encrypted text" do
            assert_equal "encrypted", display_slice_info(slice, true)
          end
        end

        describe "when not encrypted" do
          it "does not return 'encrypted'" do
            refute_equal "encrypted", display_slice_info([1, 2], false)
          end

          it "displays the slice info" do
            assert_equal "[<br />  1,<br />  2<br />]", display_slice_info([1, 2], false)
          end
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
rocketjob_mission_control-6.1.0 test/helpers/rocket_job_mission_control/slices_helper_test.rb
rocketjob_mission_control-6.0.7 test/helpers/rocket_job_mission_control/slices_helper_test.rb
rocketjob_mission_control-6.0.6 test/helpers/rocket_job_mission_control/slices_helper_test.rb
rocketjob_mission_control-6.0.5 test/helpers/rocket_job_mission_control/slices_helper_test.rb
rocketjob_mission_control-6.0.4 test/helpers/rocket_job_mission_control/slices_helper_test.rb
rocketjob_mission_control-6.0.3 test/helpers/rocket_job_mission_control/slices_helper_test.rb
rocketjob_mission_control-6.0.2 test/helpers/rocket_job_mission_control/slices_helper_test.rb
rocketjob_mission_control-6.0.1 test/helpers/rocket_job_mission_control/slices_helper_test.rb
rocketjob_mission_control-6.0.0 test/helpers/rocket_job_mission_control/slices_helper_test.rb
rocketjob_mission_control-6.0.0.beta test/helpers/rocket_job_mission_control/slices_helper_test.rb
rocketjob_mission_control-5.0.1 test/helpers/rocket_job_mission_control/slices_helper_test.rb
rocketjob_mission_control-5.0.0 test/helpers/rocket_job_mission_control/slices_helper_test.rb
rocketjob_mission_control-5.0.0.beta1 test/helpers/rocket_job_mission_control/slices_helper_test.rb