<commit_before>require 'spec_helper'

describe IOSConfigProfile::EncryptedPayload do
  let(:wrapped_payload) { double to_plist: 'wrapped payload in plist form' }

  subject { IOSConfigProfile::EncryptedPayload.new wrapped_payload }

  its(:payload) { should == 'wrapped payload in plist form' }

  # This way we ensure super was called in the #initialize
  its(:url) { should be }
  its(:identifier) { should be }
  its(:description) { should be }
  its(:display_name) { should be }
  its(:organization) { should be }
end<commit_msg>Add test<commit_after>require 'spec_helper'

describe IOSConfigProfile::EncryptedPayload do
  let(:wrapped_payload) { double to_plist: 'wrapped payload in plist form' }

  subject { IOSConfigProfile::EncryptedPayload.new wrapped_payload }

  its(:payload) { should == 'wrapped payload in plist form' }

  # This way we ensure super was called in the #initialize
  its(:url) { should be }
  its(:identifier) { should be }
  its(:description) { should be }
  its(:display_name) { should be }
  its(:organization) { should be }

  describe "#encrypted_configuration" do
    it "can return an encrypted configuration" do
      mock = double
      expect(subject).to receive(:encrypt).with('cert').and_return(mock)
      expect(mock).to receive(:certificate).and_return('asdf')
      expect(subject).to receive(:configuration).and_return('encrypted_cert')
      expect(subject.encrypted_configuration 'cert').to eq 'encrypted_cert'
    end
  end
end
{'fraction_non_alphanumeric': 0.10968178740690589, 'fraction_numerical': 0.0, 'mean_word_length': 4.750972762645914, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4487940', 'n_tokens_mistral': 442, 'n_tokens_neox': 427, 'n_words': 122}