Skip to content

Commit f2a384c

Browse files
committed
Small test refactor
1 parent 4fa0ec2 commit f2a384c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

spec/models/immunisation_import_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,15 @@
8686
it_behaves_like "a CSVImportable model"
8787

8888
describe ".create" do
89-
it "a tagged message containing the started_at time of the import" do
89+
it "logs a tagged message containing the started_at time of the import" do
9090
import = immunisation_import
9191

9292
SemanticLogger.flush
9393
semantic_logger_io.rewind
9494

95-
log_lines = semantic_logger_io.read.split("\n")
96-
tagged_lines = log_lines.map {|l| JSON.parse(l) }.select do |j|
97-
j['named_tags'] == { 'import_class' => 'ImmunisationImport', 'import_id' => import.id }
95+
log_lines = semantic_logger_io.readlines.map { |line| JSON.parse(line) }
96+
tagged_lines = log_lines.select do |line|
97+
line['named_tags'] == { 'import_class' => 'ImmunisationImport', 'import_id' => import.id }
9898
end
9999

100100
expect(tagged_lines.size).to eq(1)

0 commit comments

Comments
 (0)