Skip to content

Commit

Permalink
updated crypto encrypt/decrypt test with proper naming convention
Browse files Browse the repository at this point in the history
  • Loading branch information
sacOO7 committed May 29, 2024
1 parent 77aefef commit 25d39d3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions spec/unit/util/crypto_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@
end
end

context 'encrypts & decrypt' do
context '#encrypt & #decrypt' do
let(:string) { random_str }
let(:empty_string) { '' }

specify '#encrypts and decrypts a string' do
specify 'encrypts and decrypts a non-empty string' do
expect(string).to be_ascii_only
encrypted = subject.encrypt(string)
expect(encrypted).to be_truthy
Expand All @@ -85,15 +85,14 @@
expect(decrypted).to be_ascii_only
end

specify '#encrypts and decrypts an empty string' do
specify 'encrypts and decrypts an empty string' do
expect(empty_string).to be_ascii_only
encrypted = subject.encrypt(empty_string)
expect(encrypted).to be_truthy
decrypted = subject.decrypt(encrypted)
expect(decrypted).to eql(empty_string)
expect(decrypted).to be_ascii_only
end

end

context 'using shared client lib fixture data' do
Expand Down

0 comments on commit 25d39d3

Please sign in to comment.