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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-08-10 17:45:30 +0300
committerLin Jen-Shin <godfat@godfat.org>2016-08-10 18:12:02 +0300
commit21fdc1edaecf228c1fdc540375bbdad0fd69164a (patch)
tree8da76adcca752e497daa559ca7667787d20c3003 /spec/helpers/time_helper_spec.rb
parent831b6c8fda1adec32c0719500ad3e830284fb2af (diff)
Cleanup the use of duration and optimize some queries
Diffstat (limited to 'spec/helpers/time_helper_spec.rb')
-rw-r--r--spec/helpers/time_helper_spec.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/helpers/time_helper_spec.rb b/spec/helpers/time_helper_spec.rb
index bf3ed5c094c..21f35585367 100644
--- a/spec/helpers/time_helper_spec.rb
+++ b/spec/helpers/time_helper_spec.rb
@@ -19,16 +19,16 @@ describe TimeHelper do
describe "#duration_in_numbers" do
it "returns minutes and seconds" do
- duration_in_numbers = {
- [100, 0] => "01:40",
- [121, 0] => "02:01",
- [3721, 0] => "01:02:01",
- [0, 0] => "00:00",
- [nil, Time.now.to_i - 42] => "00:42"
+ durations_and_expectations = {
+ 100 => "01:40",
+ 121 => "02:01",
+ 3721 => "01:02:01",
+ 0 => "00:00",
+ 42 => "00:42"
}
- duration_in_numbers.each do |interval, expectation|
- expect(duration_in_numbers(*interval)).to eq(expectation)
+ durations_and_expectations.each do |duration, expectation|
+ expect(duration_in_numbers(duration)).to eq(expectation)
end
end
end