# Which test is useful to assess if a source is the same in two samples of binary data?

I am looking for a statistical test that assesses if two samples which have binary values come from the same source or from different ones.

Example:

I have one set that has 10 0s and 6 1s and another set which has 50 0s and 29 1s. I would like to test the two sets from belonging from the same source or are significantly different. What is the best one? Is t-test appropriate for this specific case?

chisq.test(cbind(c(10,6),c(50,29)))