mirror of
https://github.com/fluent/fluentd-ui.git
synced 2026-05-05 10:56:11 +02:00
Fix deprecation warnings
> DEPRECATION WARNING: ActiveModel::Errors#get is deprecated and will be > removed in Rails 5.1. To achieve the same use > model.errors[:config_file]. Signed-off-by: Kenji Okimoto <okimoto@clear-code.com>
This commit is contained in:
parent
5f9bb9f8fb
commit
6c22e1b5c2
@ -21,19 +21,19 @@ describe Fluentd do
|
||||
context "not writable" do
|
||||
before { FileUtils.chmod(0400, path) }
|
||||
it { should_not be_blank }
|
||||
it { subject.get(column).should include(I18n.t('activerecord.errors.messages.lack_write_permission')) }
|
||||
it { subject[column].should include(I18n.t('activerecord.errors.messages.lack_write_permission')) }
|
||||
end
|
||||
|
||||
context "not readable" do
|
||||
before { FileUtils.chmod(0200, path) }
|
||||
it { should_not be_blank }
|
||||
it { subject.get(column).should include(I18n.t('activerecord.errors.messages.lack_read_permission')) }
|
||||
it { subject[column].should include(I18n.t('activerecord.errors.messages.lack_read_permission')) }
|
||||
end
|
||||
|
||||
context "is directory" do
|
||||
before { fluentd.send("#{column}=", Rails.root + "tmp") }
|
||||
it { should_not be_blank }
|
||||
it { subject.get(column).should include(I18n.t('activerecord.errors.messages.is_a_directory')) }
|
||||
it { subject[column].should include(I18n.t('activerecord.errors.messages.is_a_directory')) }
|
||||
end
|
||||
end
|
||||
|
||||
@ -50,7 +50,7 @@ describe Fluentd do
|
||||
context "not writable" do
|
||||
before { FileUtils.chmod(0500, dir) }
|
||||
it { should_not be_blank }
|
||||
it { subject.get(column).should include(I18n.t('activerecord.errors.messages.lack_write_permission')) }
|
||||
it { subject[column].should include(I18n.t('activerecord.errors.messages.lack_write_permission')) }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user