Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/twine.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Ludwig <sebastian@lurado.de>2015-11-27 22:10:24 +0300
committerSebastian Ludwig <sebastian@lurado.de>2015-11-29 19:04:44 +0300
commitba4b69baf2e41b495db69b6c8dbc4d138e5752f1 (patch)
tree46295c9967ef4306a59fcfe31aab72c7ab356db0 /test/test_consume_loc_drop.rb
parent8815c095d8437350f6ac4d236a1c78506a1ba42e (diff)
Added unit tests for loc drop generation and consumption.
Diffstat (limited to 'test/test_consume_loc_drop.rb')
-rw-r--r--test/test_consume_loc_drop.rb27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/test_consume_loc_drop.rb b/test/test_consume_loc_drop.rb
new file mode 100644
index 0000000..786eca7
--- /dev/null
+++ b/test/test_consume_loc_drop.rb
@@ -0,0 +1,27 @@
+require 'command_test_case'
+
+class TestConsumeLocDrop < CommandTestCase
+ def setup
+ super
+
+ options = {}
+ options[:input_path] = fixture 'consume_loc_drop.zip'
+ options[:output_path] = @output_path
+ options[:format] = 'apple'
+
+ @twine_file = build_twine_file 'en', 'es' do
+ add_section 'Section' do
+ add_row key1: 'value1'
+ end
+ end
+
+ @runner = Twine::Runner.new(nil, options, @twine_file)
+ end
+
+ def test_consumes_zip_file
+ @runner.consume_loc_drop
+
+ assert @twine_file.strings_map['key1'].translations['en'], 'value1-english'
+ assert @twine_file.strings_map['key1'].translations['es'], 'value1-spanish'
+ end
+end