mirror of
https://github.com/fluent/fluentd-ui.git
synced 2026-05-06 03:16:11 +02:00
Use login macro
This commit is contained in:
parent
c638372499
commit
202be9592f
@ -11,12 +11,7 @@ describe "out_elasticsearch" do
|
||||
Fluentd::Agent::TdAgent.any_instance.stub(:detached_command).and_return(true)
|
||||
daemon.agent.config_write ""
|
||||
|
||||
visit '/sessions/new'
|
||||
within("form") do
|
||||
fill_in 'session_name', :with => exists_user.name
|
||||
fill_in 'session_password', :with => exists_user.password
|
||||
end
|
||||
click_button I18n.t("terms.sign_in")
|
||||
login_with exists_user
|
||||
end
|
||||
|
||||
it "Shown form" do
|
||||
|
||||
@ -9,13 +9,8 @@ describe "out_forward" do
|
||||
Fluentd.stub(:instance).and_return(daemon)
|
||||
Fluentd::Agent::TdAgent.any_instance.stub(:detached_command).and_return(true)
|
||||
daemon.agent.config_write ""
|
||||
|
||||
visit '/sessions/new'
|
||||
within("form") do
|
||||
fill_in 'session_name', :with => exists_user.name
|
||||
fill_in 'session_password', :with => exists_user.password
|
||||
end
|
||||
click_button I18n.t("terms.sign_in")
|
||||
|
||||
login_with exists_user
|
||||
end
|
||||
|
||||
it "Shown form" do
|
||||
|
||||
@ -9,13 +9,8 @@ describe "out_td" do
|
||||
Fluentd.stub(:instance).and_return(daemon)
|
||||
Fluentd::Agent::TdAgent.any_instance.stub(:detached_command).and_return(true)
|
||||
daemon.agent.config_write ""
|
||||
|
||||
visit '/sessions/new'
|
||||
within("form") do
|
||||
fill_in 'session_name', :with => exists_user.name
|
||||
fill_in 'session_password', :with => exists_user.password
|
||||
end
|
||||
click_button I18n.t("terms.sign_in")
|
||||
|
||||
login_with exists_user
|
||||
end
|
||||
|
||||
it "Shown form with filled in td.*.* on match" do
|
||||
|
||||
@ -7,15 +7,8 @@ describe "source_and_output", js: true do
|
||||
before do
|
||||
Fluentd.stub(:instance).and_return(daemon)
|
||||
Fluentd::Agent::TdAgent.any_instance.stub(:detached_command).and_return(true)
|
||||
end
|
||||
|
||||
before do
|
||||
visit '/sessions/new'
|
||||
within("form") do
|
||||
fill_in 'session_name', :with => exists_user.name
|
||||
fill_in 'session_password', :with => exists_user.password
|
||||
end
|
||||
click_button I18n.t("terms.sign_in")
|
||||
login_with exists_user
|
||||
end
|
||||
|
||||
before do
|
||||
|
||||
@ -5,12 +5,7 @@ describe "sessions" do
|
||||
|
||||
describe "sign in with default password" do
|
||||
before do
|
||||
visit '/sessions/new'
|
||||
within("form") do
|
||||
fill_in 'session_name', :with => user.name
|
||||
fill_in 'session_password', :with => user.password
|
||||
end
|
||||
click_button submit_label
|
||||
login_with user
|
||||
end
|
||||
|
||||
context "correct credentials" do
|
||||
@ -40,12 +35,8 @@ describe "sessions" do
|
||||
|
||||
before do
|
||||
exists_user.update_attributes(current_password: Settings.default_password, password: new_password, password_confirmation: new_password)
|
||||
visit '/sessions/new'
|
||||
within("form") do
|
||||
fill_in 'session_name', :with => user.name
|
||||
fill_in 'session_password', :with => user.password
|
||||
end
|
||||
click_button submit_label
|
||||
|
||||
login_with user
|
||||
end
|
||||
|
||||
after do
|
||||
@ -71,12 +62,7 @@ describe "sessions" do
|
||||
describe "sign out process" do
|
||||
let(:submit_label) { I18n.t("terms.sign_in") }
|
||||
before do
|
||||
visit '/sessions/new'
|
||||
within("form") do
|
||||
fill_in 'session_name', :with => exists_user.name
|
||||
fill_in 'session_password', :with => exists_user.password
|
||||
end
|
||||
click_button submit_label
|
||||
login_with exists_user
|
||||
end
|
||||
|
||||
before do
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user