Update spec

Signed-off-by: Kenji Okimoto <okimoto@clear-code.com>
This commit is contained in:
Kenji Okimoto 2018-04-19 11:54:42 +09:00
parent c34eeba2ca
commit a279b82078
2 changed files with 11 additions and 9 deletions

View File

@ -35,16 +35,17 @@ describe "histories", stub: :daemon do
it 'show histories#show' do
page.should have_css('h1', text: I18n.t('fluentd.settings.histories.show.page_title'))
page.should have_text(last_backup_file.content)
page.should has_text?(last_backup_file.content)
end
describe 'diff' do
context 'has diff' do
it 'shows diff between current and target' do
page.should have_text("- type http")
page.should have_text("+ type forward")
page.should have_text("- port 8899")
page.should have_text("+ port 24224")
page.should has_text?("- type http")
page.should has_text?("+ type forward")
page.should has_text?("- port 8899")
page.should has_text?("+ port 24224")
end
end
@ -64,7 +65,7 @@ describe "histories", stub: :daemon do
page.should have_css('h1', text: I18n.t('fluentd.settings.show.page_title'))
page.should have_text(I18n.t('messages.config_successfully_copied', brand: 'fluentd') )
page.should have_text(last_backup_file.content)
page.should has_text?(last_backup_file.content)
end
describe "configtest" do

View File

@ -39,9 +39,10 @@ describe "running_backup", stub: :daemon do
describe 'diff' do
context 'has diff' do
it 'shows diff between current and running' do
expect(page).to have_text("- type http")
expect(page).to have_text("- port 8899")
expect(page).to have_text("+ Running backup file content")
diff = page.first(".diff pre").native.inner_text
expect(diff).to include("- type http")
expect(diff).to include("- port 8899")
expect(diff).to include("+ Running backup file content")
end
end