Skip to content

Commit

Permalink
Update tests to new behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
ceithir committed Nov 16, 2023
1 parent 4bce501 commit e8a0c89
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 22 deletions.
3 changes: 2 additions & 1 deletion features/other_a/languages.feature
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ Feature: Languages
# Browse works in a language

When I am on the languages page
And all indexing jobs have been run
Then I should see "Deutsch"
When I follow "Deutsch"
Then I should see "1 works in 1 fandoms"
Then I should see "1 Work in Deutsch"
And I should see "Die Rache der Sith"
And I should not see "Revenge of the Sith"

Expand Down
22 changes: 1 addition & 21 deletions spec/controllers/languages_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,6 @@
end
end

describe "GET show" do
context "when not logged in" do
it "renders the show template" do
get :show, params: { id: "en" }
expect(response).to render_template("show")
end
end

Admin::VALID_ROLES.each do |role|
context "when logged in as an admin with #{role} role" do
let(:admin) { create(:admin, roles: [role]) }

it "renders the show template" do
get :show, params: { id: "en" }
expect(response).to render_template("show")
end
end
end
end

describe "GET new" do
context "when not logged in" do
it "redirects with error" do
Expand Down Expand Up @@ -227,7 +207,7 @@
end

it "redirects and returns success message" do
it_redirects_to_with_notice(finnish, "Language was successfully updated.")
it_redirects_to_with_notice(languages_path, "Language was successfully updated.")
end
end
end
Expand Down

0 comments on commit e8a0c89

Please sign in to comment.