rename_params 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4cb3e07380a5fe20a672c77c21d265591081003
|
4
|
+
data.tar.gz: c1d52eafde3e113008145ed81d74a86362761f3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0d6589fc167e43b4d357251322734bca76e2bb0f90cbe6fc081f4187397ad7f623903fa38c29b39d9c4cf8ffcbb706a9a0e928b20d5bfb29b7c9afd18b575a8
|
7
|
+
data.tar.gz: 1262bff9b7728496dd68783472e501dc04bf6b04caf530233d3f1b68a6732f9fc6e5ffcb23fd3ded711c083886f00f2e5ba848401f226bba71cdcfac41d258c4
|
@@ -5,6 +5,6 @@ describe RenameParams::Converters::HashConverter do
|
|
5
5
|
describe '#convert' do
|
6
6
|
it { expect(converter.convert(:a)).to eq 'A' }
|
7
7
|
it { expect(converter.convert(:b)).to eq 'B' }
|
8
|
-
it { expect(converter.convert(:c)).to
|
8
|
+
it { expect(converter.convert(:c)).to be :c }
|
9
9
|
end
|
10
10
|
end
|
data/spec/macros/rename_spec.rb
CHANGED
@@ -46,6 +46,13 @@ describe RenameParams::Macros::Rename, type: :controller do
|
|
46
46
|
expect(controller.params).to eq default_params
|
47
47
|
end
|
48
48
|
end
|
49
|
+
|
50
|
+
context 'if param is not included in enum' do
|
51
|
+
it 'leaves params as they were' do
|
52
|
+
get :index, { admin: 'some_value' }
|
53
|
+
expect(controller.params).to eq default_params.merge('role' => 'some_value')
|
54
|
+
end
|
55
|
+
end
|
49
56
|
end
|
50
57
|
|
51
58
|
context 'and using a Proc converter' do
|