Skip to content

Commit f7a97a1

Browse files
Merge branch 'SD-224-jobcode' into 'master'
Resolve SD-224 "Jobcode" Closes SD-224 See merge request lap/alma-user-load!46
2 parents 6b76a74 + 5f25cd7 commit f7a97a1

5 files changed

Lines changed: 11 additions & 4 deletions

File tree

lib/alma/xml_writer.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ def ensure_open!
4242
def prolog_and_opening_tag
4343
tag = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
4444
tag += "<!-- GIT_COMMIT:#{ENV['GIT_COMMIT']} -->\n"
45+
tag += "<!-- DOCKER_TAG:#{ENV['DOCKER_TAG']} -->\n"
46+
tag += "<!-- VERSION: 1.5.4 -->\n"
4547
tag += "<users>\n"
4648
tag
4749
end

spec/data/sis/expected_xml_3.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!-- GIT_COMMIT:LOCAL_TESTING -->
3+
<!-- DOCKER_TAG:DEV -->
4+
<!-- VERSION: 1.5.4 -->
35
<users>
46
<user>
57
<record_type>PUBLIC</record_type>

spec/data/ucpath/expected_xml_1.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!-- GIT_COMMIT:LOCAL_TESTING -->
3+
<!-- DOCKER_TAG:DEV -->
4+
<!-- VERSION: 1.5.4 -->
35
<users>
46
<user>
57
<record_type>PUBLIC</record_type>

spec/lib/alma_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
Alma::XMLWriter.open(out) { |w| w.write(@student_rec) }
3838
actual = File.read(out)
3939
xml = Alma::XMLBuilder.new(@student_rec).build
40-
expected = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- GIT_COMMIT:LOCAL_TESTING -->\n<users>\n#{xml}\n</users>"
41-
expect(actual).to eq(expected)
40+
expected = "<users>\n#{xml}\n</users>"
41+
expect(actual).to include(expected)
4242
end
4343
end
4444

@@ -51,9 +51,9 @@
5151
actual = File.read(out)
5252

5353
xml = Alma::XMLBuilder.new(@student_rec).build
54-
expected = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- GIT_COMMIT:LOCAL_TESTING -->\n<users>\n#{xml}\n</users>"
54+
expected = "<users>\n#{xml}\n</users>"
5555

56-
expect(actual).to eq(expected)
56+
expect(actual).to include(expected)
5757
end
5858
end
5959
end

spec/spec_helper.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
# Mock ENVs for testing
4040
config.before(:each) do
4141
ENV['GIT_COMMIT'] = 'LOCAL_TESTING'
42+
ENV['DOCKER_TAG'] = 'DEV'
4243
end
4344

4445
config.color = true

0 commit comments

Comments
 (0)