Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add tests for vacancies controller #100

Merged
merged 4 commits into from
Oct 14, 2023
Merged

add tests for vacancies controller #100

merged 4 commits into from
Oct 14, 2023

Conversation

proskurekov
Copy link
Contributor

No description provided.

Copy link
Owner

@XaoGao XaoGao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@proskurekov fix pls

let(:vacancy) { build(:vacancy) }

describe "#index" do
it "returns http status success" do
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove word "returns" in each specs

end

describe "#new" do
before { sign_in user }
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if user is not company to redirect to root_page only test in code we will fix letter

before { sign_in user }

context "when valid params" do
let(:create_vacancy) { post vacancies_path, params: { vacancy: vacancy.attributes } }
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not create let for one spec

@XaoGao XaoGao linked an issue Oct 7, 2023 that may be closed by this pull request
Copy link
Owner

@XaoGao XaoGao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@proskurekov approve

@XaoGao XaoGao merged commit ddda1af into XaoGao:develop Oct 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add spec for vacancies
2 participants