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

Disable authencation to get user's followers #5766

Closed
yashwanth2804 opened this issue Jan 27, 2020 · 0 comments
Closed

Disable authencation to get user's followers #5766

yashwanth2804 opened this issue Jan 27, 2020 · 0 comments

Comments

@yashwanth2804
Copy link

do we really need authentication to see followers of some other user's . while in twitter also we can see user's followers even without following.

describe "GET /api/followers" do
    before do
      follower.follow user
      user.reload
    end

    context "when user is unauthorized" do
      it "does not return user followers list" do
        get users_api_followers_path
        expect(response.body).not_to include follower.name
      end
    end

    context "when user is authorized" do
      it "returns user followers list" do
        sign_in user
        get users_api_followers_path
        expect(response.body).to include follower.name
      end

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

No branches or pull requests

1 participant