Sha256: 0f6931c1dff6ba666a88db6210987dd4687a1a5b4967e599a4366e5ed3009dc2

Contents?: true

Size: 1.39 KB

Versions: 18

Compression:

Stored size: 1.39 KB

Contents

# -*- coding: utf-8 -*-
require 'acceptance_helper'

feature 'spamフィルタ設定の利用' do
	scenario '新入荷のプラグインが表示される' do
		visit '/update.rb?conf=sf'

		page.all('div.saveconf').first.click_button 'OK'
		page.should_not have_content '新入荷'

		FileUtils.cp_r "#{TDiary::PATH}/spec/fixtures/sample.rb", "#{TDiary::PATH}/misc/filter/"

		click_link 'スパムフィルター選択'
		page.should have_content '新入荷'
		page.should have_content 'sample.rb'

		FileUtils.rm "#{TDiary::PATH}/misc/filter/sample.rb"
	end

	scenario 'スパムフィルター選択が保存される' do
		FileUtils.cp_r "#{TDiary::PATH}/spec/fixtures/sample.rb", "#{TDiary::PATH}/misc/filter/"

		visit '/update.rb?conf=sf'
		check "sf.sample.rb"
		page.all('div.saveconf').first.click_button 'OK'

		page.should have_checked_field "sf.sample.rb"

		FileUtils.rm "#{TDiary::PATH}/misc/filter/sample.rb"
	end

	scenario 'プラグインが消えたら表示されない' do
		FileUtils.cp_r "#{TDiary::PATH}/spec/fixtures/sample.rb", "#{TDiary::PATH}/misc/filter/"

		visit '/update.rb?conf=sf'
		page.should have_content 'sample.rb'

		FileUtils.rm "#{TDiary::PATH}/misc/filter/sample.rb"
		click_link 'スパムフィルター選択'
		page.should_not have_content 'sample.rb'
	end
end

# Local Variables:
# mode: ruby
# indent-tabs-mode: t
# tab-width: 3
# ruby-indent-level: 3
# End:
# vim: ts=3

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
tdiary-4.0.2.20140201 spec/acceptance/save_conf_filter_spec.rb
tdiary-4.0.2 spec/acceptance/save_conf_filter_spec.rb
tdiary-4.0.1.20131102 spec/acceptance/save_conf_filter_spec.rb
tdiary-4.0.1.20130929 spec/acceptance/save_conf_filter_spec.rb
tdiary-4.0.1.20130903 spec/acceptance/save_conf_filter_spec.rb
tdiary-4.0.1 spec/acceptance/save_conf_filter_spec.rb
tdiary-4.0.0.20130826 spec/acceptance/save_conf_filter_spec.rb
tdiary-4.0.0 spec/acceptance/save_conf_filter_spec.rb
tdiary-3.2.2.20130727 spec/acceptance/save_conf_filter_spec.rb
tdiary-3.2.2.20130722 spec/acceptance/save_conf_filter_spec.rb
tdiary-3.2.2.20130720 spec/acceptance/save_conf_filter_spec.rb
tdiary-3.2.2.20130617 spec/acceptance/save_conf_filter_spec.rb
tdiary-3.2.2.20130614 spec/acceptance/save_conf_filter_spec.rb
tdiary-3.2.2.20130604 spec/acceptance/save_conf_filter_spec.rb
tdiary-3.2.2.20130527 spec/acceptance/save_conf_filter_spec.rb
tdiary-3.2.2.20130518 spec/acceptance/save_conf_filter_spec.rb
tdiary-3.2.2.20130508 spec/acceptance/save_conf_filter_spec.rb
tdiary-3.2.2.20130507 spec/acceptance/save_conf_filter_spec.rb