aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/stif/permission_translator_spec.rb9
-rw-r--r--spec/spec_helper.rb7
2 files changed, 11 insertions, 5 deletions
diff --git a/spec/lib/stif/permission_translator_spec.rb b/spec/lib/stif/permission_translator_spec.rb
index 1af21364c..9675382e6 100644
--- a/spec/lib/stif/permission_translator_spec.rb
+++ b/spec/lib/stif/permission_translator_spec.rb
@@ -1,3 +1,4 @@
+# coding: utf-8
RSpec.describe Stif::PermissionTranslator do
context "No SSO Permissions" do
@@ -15,15 +16,15 @@ RSpec.describe Stif::PermissionTranslator do
context "SSO Permission boiv:edit-offer →" do
it "all permissions" do
- expect( described_class.translate(%w{boiv:edit-offer}) ).to eq(Support::Permissions.all_permissions)
+ expect( described_class.translate(%w{boiv:edit-offer}) ).to match_array(Support::Permissions.all_permissions)
end
it "all permissions, no doubletons" do
- expect( described_class.translate(%w{boiv:edit-offer boiv:read-offer}) ).to eq(Support::Permissions.all_permissions)
+ expect( described_class.translate(%w{boiv:edit-offer boiv:read-offer}) ).to match_array(Support::Permissions.all_permissions)
end
it "all permissions, input order agnostic" do
- expect( described_class.translate(%w{boiv:read-offer boiv:edit-offer}) ).to eq(Support::Permissions.all_permissions)
+ expect( described_class.translate(%w{boiv:read-offer boiv:edit-offer}) ).to match_array(Support::Permissions.all_permissions)
end
end
@@ -39,7 +40,7 @@ RSpec.describe Stif::PermissionTranslator do
it "does not add garbage or doubletons for boiv:edit-offer level" do
expect(
described_class.translate(%w{xxx boiv:read-offer lines.delete boiv:edit-offer footnotes.update})
- ).to eq(Support::Permissions.all_permissions)
+ ).to match_array(Support::Permissions.all_permissions)
end
end
end
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 6176babea..6b37b9fa8 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,6 +1,7 @@
# This file is copied to spec/ when you run 'rails generate rspec:install'
-require 'simplecov'
unless ENV['NO_RCOV']
+ require 'simplecov'
+
if ENV['JOB_NAME']
require 'simplecov-rcov'
SimpleCov.formatters = [
@@ -8,8 +9,12 @@ unless ENV['NO_RCOV']
SimpleCov::Formatter::RcovFormatter
]
end
+
SimpleCov.start 'rails' do
add_filter 'vendor'
+ add_filter 'app/exporters/chouette/hub'
+ add_filter 'app/maps'
+ add_filter 'lib/ievkit'
end
end